public ActionResult FormBuilder(string[] title, string[] controlType, string[] dataType, string[] defaultValue, string[] maxLength, string[] required, string[] isAttachments, int[] sortOrder, string formTypeId, string definationTypeId, int[] formid, int[] isdeleted, string[] comment) { AV_SiteScriptFormEntry nodeProp = new AV_SiteScriptFormEntry(); nodeProp.NodeTypeId = decimal.Parse(definationTypeId); // NodesPropertiesBL.Manage("Delete", nodeProp); if (title != null) { for (int i = 0; i < title.Length; i++) { if (title[i] != null && dataType[i] != null && maxLength[i] != null) { nodeProp = new AV_SiteScriptFormEntry { NodeTypeId = decimal.Parse(definationTypeId), Title = title[i], DataType = dataType[i], DefaultValue = defaultValue[i], MaxLength = maxLength[i], Required = required[i] == "true" ? "true" : "false", SortOrder = sortOrder[i], FormId = formid[i], IsDeleted = isdeleted[i] }; NodesPropertiesBL.Manage("Insert", nodeProp); } } return(Json(new { Status = true }, JsonRequestBehavior.AllowGet)); } // return RedirectToAction("FormBuilder", "Template"); return(Json(new { Status = false }, JsonRequestBehavior.AllowGet)); }
public int Manage(string filter, AV_SiteScriptFormEntry np) { return(nDL.ManageSiteScriptsForm(filter, np.FormId, np.NodeTypeId, np.Title, np.ControlType, np.DataType, np.DefaultValue, np.MaxLength, np.Required, np.IsAttachment, np.SortOrder, np.IsDeleted, np.SrId)); }