public ActionResult TemplateSection(TemplateFormSectionBE model) { bool success = false; int id = 0; bool sectionExist = true; TemplateFormSectionBE templateFormSection = FormLogic.FetchTemplateFormSection(model.FormID, model.Section); if (templateFormSection == null) { sectionExist = false; templateFormSection = new TemplateFormSectionBE(); } templateFormSection.FormID = model.FormID; templateFormSection.Section = model.Section.ToUpper(); templateFormSection.Description = model.Description; if (!sectionExist) { success = FormLogic.AddTemplateFormSection(templateFormSection); } else { success = FormLogic.UpdateTemplateFormSection(templateFormSection); } return(Json(new { success, id })); }
public ActionResult TemplateSection(int formID, string section) { TemplateFormSectionBE model; model = FormLogic.FetchTemplateFormSection(formID, section ?? ""); if (model == null) { model = new TemplateFormSectionBE(); } return(View(model)); }
public ActionResult TemplateSection(int formID, string section) { TemplateFormSectionBE model; model = FormLogic.FetchTemplateFormSection(formID, section ?? ""); if (model == null) { model = new TemplateFormSectionBE(); } if (string.IsNullOrWhiteSpace(model.BackgroundColor)) { model.BackgroundColor = "#ffffff"; } return(View(model)); }
public ActionResult TemplateSectionList(PermitFormScreenDesignTemplateDetailModelBE model) { bool success = true; if (model.TemplateSectionDetail != null && model.TemplateSectionDetail.Count > 0) { foreach (var se in model.TemplateSectionDetail) { if (success) { TemplateFormSectionBE templateFormSection = FormLogic.FetchTemplateFormSection(se.FormID, se.Section); if (templateFormSection != null) { templateFormSection.Sequence = se.Sequence; success = FormLogic.UpdateTemplateFormSection(templateFormSection); } } } } return(Json(new { Success = success })); }