/// class PD.Manage.Services.DocumentTypeService

PD.Manage.Services.DocumentTypeService =
Class.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    deleteDocumentType: function (documentTypeId, success, error) {

        PD.ajax({
            type: "DELETE",
            url: ProspectDirector.RUNTIME.resolveUrl("~/Manage/DocumentTypes/DeleteDocumentType"),
            data: {
                documentTypeId: documentTypeId,
                confirmed: true
            },
            success: success,
            error: error
        });

    },

    saveDocumentTypeForm: function (documentTypeFormId, layout, success, error) {
    
        PD.ajax({
            type: "POST",
            url: ProspectDirector.RUNTIME.resolveUrl("~/FormDesign/Save"),
            data: {
                formId: documentTypeFormId,
                layout: JSON.stringify(layout)
            },
            success: success,
            error: error
        });

    }

});