public TemplateElementsResponse GetTemplateElementsByTemplateGuid(Guid guid) { TemplateElementsResponse oTemplateElementsResponse = new TemplateElementsResponse(); { TemplatesBL oTemplateElementsBL = new TemplatesBL(); List <TemplateElements> liTemplateElements = new List <TemplateElements>(); ServerResponse.ResponseCodes eResponse = oTemplateElementsBL.GetTemplateElementsByTemplateGuid(out liTemplateElements, guid); oTemplateElementsResponse.data = new multipletemplateelementsresponse { TemplateElements = liTemplateElements }; oTemplateElementsResponse.meta.error_message = ServerResponse.GetResponse(eResponse); oTemplateElementsResponse.meta.code = Convert.ToInt32(eResponse); } return(oTemplateElementsResponse); }
public TemplateResponse GetTemplateByGuid(Guid id) { TemplateResponse oSingleTemplateResponse = new TemplateResponse(); { TemplatesBL oTemplatesBL = new TemplatesBL(); Templates oTemplates = new Templates(); ServerResponse.ResponseCodes eResponse = oTemplatesBL.GetTemplateByTemplateGuid(out oTemplates, id); oSingleTemplateResponse.data = new singleTemplateresponse { Template = oTemplates }; oSingleTemplateResponse.meta.error_message = ServerResponse.GetResponse(eResponse); oSingleTemplateResponse.meta.code = Convert.ToInt32(eResponse); } return(oSingleTemplateResponse); }
public TemplatesResponse GetTemplates() { TemplatesResponse oTemplatesResponse = new TemplatesResponse(); { TemplatesBL oTemplatesBL = new TemplatesBL(); List <Templates> liTemplates = new List <Templates>(); ServerResponse.ResponseCodes eResponse = ServerResponse.ResponseCodes.Internal_Error; eResponse = oTemplatesBL.GetAllTemplates(out liTemplates); oTemplatesResponse.data = new multipleTemplateresponse { Templates = liTemplates }; oTemplatesResponse.meta.error_message = ServerResponse.GetResponse(eResponse); oTemplatesResponse.meta.code = Convert.ToInt32(eResponse); } return(oTemplatesResponse); }