public ActionResult EditPermitFormField(PermitFormScreenDesignTemplateDetailBE model)
        {
            bool success = false;
            int  id      = 0;

            PermitFormScreenDesignTemplateDetailBE permitFormScreenDesignTemplateDetail = FormLogic.FetchPermitFormScreenDesignTemplateDetail(model.FormID, model.Field);

            if (permitFormScreenDesignTemplateDetail == null)
            {
                permitFormScreenDesignTemplateDetail = new PermitFormScreenDesignTemplateDetailBE();
            }
            permitFormScreenDesignTemplateDetail.FormID    = model.FormID;
            permitFormScreenDesignTemplateDetail.Field     = model.Field;
            permitFormScreenDesignTemplateDetail.FieldName = model.FieldName;
            permitFormScreenDesignTemplateDetail.FieldType = model.FieldType;
            permitFormScreenDesignTemplateDetail.Section   = model.Section;
            permitFormScreenDesignTemplateDetail.Sequence  = model.Sequence;

            if (model.Field <= 0)
            {
                success = FormLogic.AddPermitFormScreenDesignTemplateDetail(permitFormScreenDesignTemplateDetail);
            }
            else
            {
                success = FormLogic.UpdatePermitFormScreenDesignTemplateDetail(permitFormScreenDesignTemplateDetail);
            }
            return(Json(new { success, id }));
        }
        public ActionResult PermitFormScreenDesignTemplateDetailFields(PermitFormScreenDesignTemplateDetailBE formDetail)
        {
            bool success = true;

            if (formDetail != null)
            {
                PermitFormScreenDesignTemplateDetailBE permitFormScreenDesignTemplateDetailBE = FormLogic.FetchPermitFormScreenDesignTemplateDetail(formDetail.FormID, formDetail.Field);
                if (permitFormScreenDesignTemplateDetailBE != null)
                {
                    permitFormScreenDesignTemplateDetailBE.Section  = formDetail.Section;
                    permitFormScreenDesignTemplateDetailBE.Sequence = formDetail.Sequence;
                    success = FormLogic.UpdatePermitFormScreenDesignTemplateDetail(permitFormScreenDesignTemplateDetailBE);
                }
            }
            return(Json(new { Success = success }));
        }
        public ActionResult EditPermitFormField(int formID, int fieldID)
        {
            PermitFormScreenDesignTemplateDetailBE model;

            model = FormLogic.FetchPermitFormScreenDesignTemplateDetail(formID, fieldID);
            if (model == null)
            {
                model = new PermitFormScreenDesignTemplateDetailBE();
            }

            ViewData["SectionList"] = FormLogic.FetchAllTemplateFormSection(formID).Select(m => new SelectListItem()
            {
                Text  = m.Section,
                Value = m.Section
            });

            return(View(model));
        }