public ActionResult PermitFormScreenDesignTemplateDetail(PermitFormScreenDesignTemplateDetailModelBE model)
        {
            bool success = false;

            //success = FormLogic.Save(model.TemplateDetails);
            return(new JsonResult(new { Success = success, TemplateDetails = success ? model.TemplateDetails : null }));
        }
        public ActionResult TemplateSectionList(int formID)
        {
            PermitFormScreenDesignTemplateDetailModelBE model = new PermitFormScreenDesignTemplateDetailModelBE();

            model.TemplateSectionDetail = FormLogic.FetchAllTemplateFormSection(formID);
            return(PartialView("TemplateSectionList", model));
        }
        public ActionResult PermitFormScreenDesignTemplateDetail(int formID)
        {
            PermitFormScreenDesignTemplateDetailModelBE model = new PermitFormScreenDesignTemplateDetailModelBE();

            model.TemplateDetails = new List <PermitFormScreenDesignTemplateDetailBE>();

            PermitFormScreenDesignTemplateBE permitFormScreenDesignTemplate = FormLogic.FetchPermitFormScreenDesignTemplate(formID);

            if (permitFormScreenDesignTemplate != null)
            {
                model.FormID      = permitFormScreenDesignTemplate.FormID;
                model.Design      = permitFormScreenDesignTemplate.Design;
                model.Description = permitFormScreenDesignTemplate.Description;
                model.Active      = permitFormScreenDesignTemplate.Active;
            }
            model.TemplateSectionDetail = FormLogic.FetchAllTemplateFormSection(model.FormID);
            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 }));
        }