public ActionResult BindDropDown(commanbaseParamater CBP)
        {
            try
            {
                DataSet ds = _objCM.BindDropDownBase_Tab2(CBP);
                List<CommanDropdown> Segment = new List<CommanDropdown>();
                List<CommanDropdown> Corporate = new List<CommanDropdown>();
                List<CommanDropdown> RATING = new List<CommanDropdown>();
                List<CommanDropdown> Master = new List<CommanDropdown>();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewBag.fname = ds.Tables[0];
                    foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
                    {
                        Segment.Add(new CommanDropdown { Text = @dr["xname"].ToString(), Value = @dr["xcode"].ToString() });
                    }
                }
                if (ds.Tables[1].Rows.Count > 0)
                {
                    ViewBag.Corporate = ds.Tables[1];
                    foreach (System.Data.DataRow dr in ViewBag.Corporate.Rows)
                    {
                        Corporate.Add(new CommanDropdown { Text = @dr["xname"].ToString(), Value = @dr["xcode"].ToString() });
                    }
                }
                if (ds.Tables[2].Rows.Count > 0)
                {
                    ViewBag.RATING = ds.Tables[2];
                    foreach (System.Data.DataRow dr in ViewBag.RATING.Rows)
                    {
                        RATING.Add(new CommanDropdown { Text = @dr["xname"].ToString(), Value = @dr["xcode"].ToString() });
                    }
                }
                if (ds.Tables[3].Rows.Count > 0)
                {
                    ViewBag.Master = ds.Tables[3];
                    foreach (System.Data.DataRow dr in ViewBag.Master.Rows)
                    {
                        Master.Add(new CommanDropdown { Text = @dr["xname"].ToString(), Value = @dr["xcode"].ToString() });
                    }
                }


                var result = Segment;
                // return Json(result, JsonRequestBehavior.AllowGet);
                return Json(new { Segment = Segment, Corporate = Corporate, RATING = RATING, Master = Master }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception)
            {

                throw;
            }


        }
 public DataSet BindDropDown(commanbaseParamater CBP)
 {
     try
     {
         _cn.Open();
         SqlCommand _cmd = new SqlCommand("sp_Base_Form_Field_Master", _cn);
         _cmd.CommandType = CommandType.StoredProcedure;
         _cmd.Parameters.AddWithValue("@Module", CBP.Module);
         _cmd.Parameters.AddWithValue("@screen", CBP.screen);
         _cmd.Parameters.AddWithValue("@FormCode", CBP.FormCode);
         _cmd.Parameters.AddWithValue("@TabCode", CBP.TabCode);
         _cmd.Parameters.AddWithValue("@Corporate", CBP.Corporate);
         _cmd.Parameters.AddWithValue("@unit", CBP.unit);
         _cmd.Parameters.AddWithValue("@Branch", CBP.Branch);
         _cmd.Parameters.AddWithValue("@userid", CBP.userid);
         _cmd.Parameters.AddWithValue("@Ip", CBP.Ip);
         _cmd.Parameters.AddWithValue("@Type", CBP.Type);
         _cmd.Parameters.AddWithValue("@field1", CBP.field1);
         _cmd.Parameters.AddWithValue("@field2", CBP.field2);
         _cmd.Parameters.AddWithValue("@field3", CBP.field3);
         _cmd.Parameters.AddWithValue("@field4", CBP.field4);
         _cmd.Parameters.AddWithValue("@field5", CBP.field5);
         _cmd.Parameters.AddWithValue("@Control", CBP.Control);
         _cmd.Parameters.AddWithValue("@Srno", CBP.Srno);
         _cmd.CommandType = CommandType.StoredProcedure;
         SqlDataAdapter _adp = new SqlDataAdapter(_cmd);
         DataSet _ds = new DataSet();
         _adp.Fill(_ds);
         _adp.Dispose();
         _cmd.Dispose();
         return _ds;
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         _cn.Close();
         _cn.Dispose();
     }
 }
 //Create View Tab
 public ActionResult BindDropDownbase(commanbaseParamater CBP)
 {
     try
     {
         DataSet ds = _objDBViewSetup.BindDropDownBase(CBP);
         List<CommanDropdown> items = new List<CommanDropdown>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public ActionResult BindDropDown_Multiselect(commanbaseParamater CBP)
        {
            try
            {
                DataSet ds = _objCM.BindDropDownTab2(CBP);
                List<CommanDropdown> Mul = new List<CommanDropdown>();
                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        // Mul = null;
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            Mul.Clear();
                            ViewBag.fname = "";
                            ViewBag.fname = ds.Tables[0];
                            foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
                            {
                                Mul.Add(new CommanDropdown { Text = @dr["xname"].ToString(), Value = @dr["xcode"].ToString() });
                            }

                        }
                    }
                }

                var result = Mul;
                return Json(new { AMul = result }, JsonRequestBehavior.AllowGet); ;
            }
            catch (Exception)
            {

                throw;
            }


        }
 public ActionResult CorporateBasicbasesp(commanbaseParamater CBP)
 {
     try
     {
         DataSet ds = _objwl.CorporateBasicbasesp(CBP);
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.ComapanyName = "1";
         }
         else
         {
             ViewBag.ComapanyName = "0";
         }
         var result = ViewBag.ComapanyName;
         return Json(new { Duplicate = result }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public ActionResult ALL_Data_Field(commanbaseParamater CBP)
        {
            try
            {
                DataSet ds = _objCM.FormLoadHelp(CBP);
                //DataSet ds = _objCM.Edit_data(EA);
                // DataSet ds = _objCM.FormLoadHelp(CUH);
                //List<CommanMaster> Master = new List<CommanMaster>();
                List<CommanMasterCaption> Caption = new List<CommanMasterCaption>();
                List<CommanMasterPlaceholder> Placeholder = new List<CommanMasterPlaceholder>();
                List<CommanMasterValidation> Validation = new List<CommanMasterValidation>();
                List<CommanMasterHelp> Tooltip = new List<CommanMasterHelp>();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewBag.Caption = ds.Tables[0];
                    foreach (System.Data.DataRow dr in ViewBag.Caption.Rows)
                    {
                        Caption.Add(new CommanMasterCaption
                        {
                            xmastercaption = @dr["xmaster"].ToString(),
                            SEGMENTcaption = @dr["SEGMENT"].ToString(),
                            Field1caption = @dr["Field1"].ToString(),
                            Field2caption = @dr["Field2"].ToString(),
                            Field3caption = @dr["Field3"].ToString(),
                            Field4caption = @dr["Field4"].ToString(),
                            Field5caption = @dr["Field5"].ToString(),
                            Field6caption = @dr["Field6"].ToString(),
                            Field7caption = @dr["Field7"].ToString(),
                            Field8caption = @dr["Field8"].ToString(),
                            Field9caption = @dr["Field9"].ToString(),
                            Field10caption = @dr["Field10"].ToString(),
                            Field11caption = @dr["Field11"].ToString(),
                            Field12caption = @dr["Field12"].ToString(),
                            Field13caption = @dr["Field13"].ToString(),
                            Field14caption = @dr["Field14"].ToString(),
                            Field15caption = @dr["Field15"].ToString(),
                            Field16caption = @dr["Field16"].ToString(),
                            Field17caption = @dr["Field17"].ToString(),
                            Field18caption = @dr["Field18"].ToString(),
                            Field19caption = @dr["Field19"].ToString(),
                            Field20caption = @dr["Field20"].ToString(),
                            Rating1caption = @dr["Rating1"].ToString(),
                            Rating2caption = @dr["Rating2"].ToString(),
                            Rating3caption = @dr["Rating3"].ToString(),
                            Date1caption = @dr["Date1"].ToString(),
                            Date2caption = @dr["Date2"].ToString(),
                            Date3caption = @dr["Date3"].ToString(),
                            Email1caption = @dr["Email1"].ToString(),
                            Email2caption = @dr["Email2"].ToString(),
                            Email3caption = @dr["Email3"].ToString(),
                            Amountcaption = @dr["Amount"].ToString(),
                            Amount2caption = @dr["Amount2"].ToString(),
                            Amount3caption = @dr["Amount3"].ToString(),
                            Time1caption = @dr["Time1"].ToString(),
                            Time2caption = @dr["Time2"].ToString(),
                            Htmlcaption = @dr["Html"].ToString(),
                            Uploadcaption = @dr["Upload"].ToString(),
                            TextAreacaption = @dr["TextArea"].ToString(),
                            MultiSelect1caption = @dr["MultiSelect1"].ToString(),
                            MultiSelect2caption = @dr["MultiSelect2"].ToString(),
                            MultiSelect3caption = @dr["MultiSelect3"].ToString(),
                            MultiSelect4caption = @dr["MultiSelect4"].ToString(),
                            MultiSelect5caption = @dr["MultiSelect5"].ToString(),
                        });
                    }
                }
                var caption = Caption;

                if (ds.Tables[1].Rows.Count > 0)
                {
                    ViewBag.Placeholder = ds.Tables[1];
                    foreach (System.Data.DataRow dr in ViewBag.Placeholder.Rows)
                    {
                        Placeholder.Add(new CommanMasterPlaceholder
                        {
                            xmaster = @dr["xmaster"].ToString(),
                            Field1 = @dr["Field1"].ToString(),
                            Field2 = @dr["Field2"].ToString(),
                            Field3 = @dr["Field3"].ToString(),
                            Field4 = @dr["Field4"].ToString(),
                            Field5 = @dr["Field5"].ToString(),
                            Field6 = @dr["Field6"].ToString(),
                            Field7 = @dr["Field7"].ToString(),
                            Field8 = @dr["Field8"].ToString(),
                            Field9 = @dr["Field9"].ToString(),
                            Field10 = @dr["Field10"].ToString(),
                            Field11 = @dr["Field11"].ToString(),
                            Field12 = @dr["Field12"].ToString(),
                            Field13 = @dr["Field13"].ToString(),
                            Field14 = @dr["Field14"].ToString(),
                            Field15 = @dr["Field15"].ToString(),
                            Field16 = @dr["Field16"].ToString(),
                            Field17 = @dr["Field17"].ToString(),
                            Field18 = @dr["Field18"].ToString(),
                            Field19 = @dr["Field19"].ToString(),
                            Field20 = @dr["Field20"].ToString(),
                            Rating1 = @dr["Rating1"].ToString(),
                            Rating2 = @dr["Rating2"].ToString(),
                            Rating3 = @dr["Rating3"].ToString(),
                            Date1 = @dr["Date1"].ToString(),
                            Date2 = @dr["Date2"].ToString(),
                            Date3 = @dr["Date3"].ToString(),
                            Email1 = @dr["Email1"].ToString(),
                            Email2 = @dr["Email2"].ToString(),
                            Email3 = @dr["Email3"].ToString(),
                            Amount = @dr["Amount"].ToString(),
                            Amount2 = @dr["Amount2"].ToString(),
                            Amount3 = @dr["Amount3"].ToString(),
                            Time1 = @dr["Time1"].ToString(),
                            Time2 = @dr["Time2"].ToString(),
                            Html = @dr["Html"].ToString(),
                            Upload = @dr["Upload"].ToString(),
                            TextArea = @dr["TextArea"].ToString(),
                            MultiSelect1 = @dr["MultiSelect1"].ToString(),
                            MultiSelect2 = @dr["MultiSelect2"].ToString(),
                            MultiSelect3 = @dr["MultiSelect3"].ToString(),
                            MultiSelect4 = @dr["MultiSelect4"].ToString(),
                            MultiSelect5 = @dr["MultiSelect5"].ToString(),
                        });
                    }
                }

                var placeholder = Placeholder;


                if (ds.Tables[2].Rows.Count > 0)
                {
                    ViewBag.avalidation = ds.Tables[2];
                    foreach (System.Data.DataRow dr in ViewBag.avalidation.Rows)
                    {
                        Validation.Add(new CommanMasterValidation
                        {
                            xmaster = @dr["xmaster"].ToString(),
                            Field1 = @dr["Field1"].ToString(),
                            Field2 = @dr["Field2"].ToString(),
                            Field3 = @dr["Field3"].ToString(),
                            Field4 = @dr["Field4"].ToString(),
                            Field5 = @dr["Field5"].ToString(),
                            Field6 = @dr["Field6"].ToString(),
                            Field7 = @dr["Field7"].ToString(),
                            Field8 = @dr["Field8"].ToString(),
                            Field9 = @dr["Field9"].ToString(),
                            Field10 = @dr["Field10"].ToString(),
                            Field11 = @dr["Field11"].ToString(),
                            Field12 = @dr["Field12"].ToString(),
                            Field13 = @dr["Field13"].ToString(),
                            Field14 = @dr["Field14"].ToString(),
                            Field15 = @dr["Field15"].ToString(),
                            Field16 = @dr["Field16"].ToString(),
                            Field17 = @dr["Field17"].ToString(),
                            Field18 = @dr["Field18"].ToString(),
                            Field19 = @dr["Field19"].ToString(),
                            Field20 = @dr["Field20"].ToString(),
                            Rating1 = @dr["Rating1"].ToString(),
                            Rating2 = @dr["Rating2"].ToString(),
                            Rating3 = @dr["Rating3"].ToString(),
                            Date1 = @dr["Date1"].ToString(),
                            Date2 = @dr["Date2"].ToString(),
                            Date3 = @dr["Date3"].ToString(),
                            Email1 = @dr["Email1"].ToString(),
                            Email2 = @dr["Email2"].ToString(),
                            Email3 = @dr["Email3"].ToString(),
                            Amount = @dr["Amount"].ToString(),
                            Amount2 = @dr["Amount2"].ToString(),
                            Amount3 = @dr["Amount3"].ToString(),
                            Time1 = @dr["Time1"].ToString(),
                            Time2 = @dr["Time2"].ToString(),
                            Html = @dr["Html"].ToString(),
                            Upload = @dr["Upload"].ToString(),
                            TextArea = @dr["TextArea"].ToString(),
                            MultiSelect1 = @dr["MultiSelect1"].ToString(),
                            MultiSelect2 = @dr["MultiSelect2"].ToString(),
                            MultiSelect3 = @dr["MultiSelect3"].ToString(),
                            MultiSelect4 = @dr["MultiSelect4"].ToString(),
                            MultiSelect5 = @dr["MultiSelect5"].ToString(),
                        });
                    }
                }

                var validation = Validation;

                if (ds.Tables[3].Rows.Count > 0)
                {
                    ViewBag.Tooltip = ds.Tables[3];
                    foreach (System.Data.DataRow dr in ViewBag.Tooltip.Rows)
                    {
                        Tooltip.Add(new CommanMasterHelp
                        {
                            xmaster = @dr["xmaster"].ToString(),
                            Field1 = @dr["Field1"].ToString(),
                            Field2 = @dr["Field2"].ToString(),
                            Field3 = @dr["Field3"].ToString(),
                            Field4 = @dr["Field4"].ToString(),
                            Field5 = @dr["Field5"].ToString(),
                            Field6 = @dr["Field6"].ToString(),
                            Field7 = @dr["Field7"].ToString(),
                            Field8 = @dr["Field8"].ToString(),
                            Field9 = @dr["Field9"].ToString(),
                            Field10 = @dr["Field10"].ToString(),
                            Field11 = @dr["Field11"].ToString(),
                            Field12 = @dr["Field12"].ToString(),
                            Field13 = @dr["Field13"].ToString(),
                            Field14 = @dr["Field14"].ToString(),
                            Field15 = @dr["Field15"].ToString(),
                            Field16 = @dr["Field16"].ToString(),
                            Field17 = @dr["Field17"].ToString(),
                            Field18 = @dr["Field18"].ToString(),
                            Field19 = @dr["Field19"].ToString(),
                            Field20 = @dr["Field20"].ToString(),
                            Rating1 = @dr["Rating1"].ToString(),
                            Rating2 = @dr["Rating2"].ToString(),
                            Rating3 = @dr["Rating3"].ToString(),
                            Date1 = @dr["Date1"].ToString(),
                            Date2 = @dr["Date2"].ToString(),
                            Date3 = @dr["Date3"].ToString(),
                            Email1 = @dr["Email1"].ToString(),
                            Email2 = @dr["Email2"].ToString(),
                            Email3 = @dr["Email3"].ToString(),
                            Amount = @dr["Amount"].ToString(),
                            Amount2 = @dr["Amount2"].ToString(),
                            Amount3 = @dr["Amount3"].ToString(),
                            Time1 = @dr["Time1"].ToString(),
                            Time2 = @dr["Time2"].ToString(),
                            Html = @dr["Html"].ToString(),
                            Upload = @dr["Upload"].ToString(),
                            TextArea = @dr["TextArea"].ToString(),
                            MultiSelect1 = @dr["MultiSelect1"].ToString(),
                            MultiSelect2 = @dr["MultiSelect2"].ToString(),
                            MultiSelect3 = @dr["MultiSelect3"].ToString(),
                            MultiSelect4 = @dr["MultiSelect4"].ToString(),
                            MultiSelect5 = @dr["MultiSelect5"].ToString(),
                        });
                    }
                }

                var tooltip = Tooltip;
                //return Json(result, JsonRequestBehavior.AllowGet);
                return Json(new { ACaption = caption, Aplaceholder = placeholder, AValidation = validation, Atooltip = tooltip }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception)
            {

                throw;
            }
        }
        public ActionResult FormLoadHelp(commanbaseParamater CBP)
        {
            try
            {
                DataSet ds = _objCM.FormLoadHelp(CBP);

                List<CommanMasterPlaceholder> itemsHelp = new List<CommanMasterPlaceholder>();

                if (ds.Tables[2].Rows.Count > 0)
                {
                    ViewBag.Placeholder = ds.Tables[2];

                    foreach (System.Data.DataRow dr in ViewBag.Placeholder.Rows)
                    {
                        itemsHelp.Add(new CommanMasterPlaceholder
                        {
                            Field1 = @dr["Field1"].ToString(),
                            Field2 = @dr["Field2"].ToString(),
                            Field3 = @dr["Field3"].ToString(),
                            Field4 = @dr["Field4"].ToString(),
                            Field5 = @dr["Field5"].ToString(),
                            Field6 = @dr["Field6"].ToString(),
                            Field7 = @dr["Field7"].ToString(),
                            Field8 = @dr["Field8"].ToString(),
                            Field9 = @dr["Field9"].ToString(),
                            Field10 = @dr["Field10"].ToString(),
                            Field11 = @dr["Field11"].ToString(),
                            Field12 = @dr["Field12"].ToString(),
                            Field13 = @dr["Field13"].ToString(),
                            Field14 = @dr["Field14"].ToString(),
                            Field15 = @dr["Field15"].ToString(),
                            Field16 = @dr["Field16"].ToString(),
                            Field17 = @dr["Field17"].ToString(),
                            Field18 = @dr["Field18"].ToString(),
                            Field19 = @dr["Field19"].ToString(),
                            Field20 = @dr["Field20"].ToString(),
                            Rating1 = @dr["Rating1"].ToString(),
                            Rating2 = @dr["Rating2"].ToString(),
                            Rating3 = @dr["Rating3"].ToString(),
                            Date1 = @dr["Date1"].ToString(),
                            Date2 = @dr["Date2"].ToString(),
                            Date3 = @dr["Date3"].ToString(),
                            Email1 = @dr["Email1"].ToString(),
                            Email2 = @dr["Email2"].ToString(),
                            Email3 = @dr["Email3"].ToString(),
                            Amount = @dr["Amount"].ToString(),
                            Amount2 = @dr["Amount2"].ToString(),
                            Amount3 = @dr["Amount3"].ToString(),
                            Time1 = @dr["Time1"].ToString(),
                            Time2 = @dr["Time2"].ToString(),
                            Html = @dr["Html"].ToString(),
                            Upload = @dr["Upload"].ToString(),
                            TextArea = @dr["Textarea"].ToString(),
                            MultiSelect1 = @dr["Multiselect1"].ToString(),
                            MultiSelect2 = @dr["Multiselect2"].ToString(),
                            MultiSelect3 = @dr["Multiselect3"].ToString(),
                            MultiSelect4 = @dr["Multiselect4"].ToString(),
                            MultiSelect5 = @dr["Multiselect5"].ToString()
                        });
                    }
                }

                var result = itemsHelp;
                return Json(result, JsonRequestBehavior.AllowGet);
            }
            catch (Exception)
            {

                throw;
            }


        }
        public ActionResult FormLoad(commanbaseParamater CBP)
        {
            try
            {
                DataSet ds = _objCM.FormLoad(CBP);

                List<CommanMasterCaption> itemsFormLoad = new List<CommanMasterCaption>();

                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewBag.fname = ds.Tables[0];
                    foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
                    {
                        itemsFormLoad.Add(new CommanMasterCaption
                        {
                            Field1caption = @dr["Field1"].ToString(),
                            Field2caption = @dr["Field2"].ToString(),
                            Field3caption = @dr["Field3"].ToString(),
                            Field4caption = @dr["Field4"].ToString(),
                            Field5caption = @dr["Field5"].ToString(),
                            Field6caption = @dr["Field6"].ToString(),
                            Field7caption = @dr["Field7"].ToString(),
                            Field8caption = @dr["Field8"].ToString(),
                            Field9caption = @dr["Field9"].ToString(),
                            Field10caption = @dr["Field10"].ToString(),
                            Field11caption = @dr["Field11"].ToString(),
                            Field12caption = @dr["Field12"].ToString(),
                            Field13caption = @dr["Field13"].ToString(),
                            Field14caption = @dr["Field14"].ToString(),
                            Field15caption = @dr["Field15"].ToString(),
                            Field16caption = @dr["Field16"].ToString(),
                            Field17caption = @dr["Field17"].ToString(),
                            Field18caption = @dr["Field18"].ToString(),
                            Field19caption = @dr["Field19"].ToString(),
                            Field20caption = @dr["Field20"].ToString(),
                            Rating1caption = @dr["Rating1"].ToString(),
                            Rating2caption = @dr["Rating2"].ToString(),
                            Rating3caption = @dr["Rating3"].ToString(),
                            Date1caption = @dr["Date1"].ToString(),
                            Date2caption = @dr["Date2"].ToString(),
                            Date3caption = @dr["Date3"].ToString(),
                            Email1caption = @dr["Email1"].ToString(),
                            Email2caption = @dr["Email2"].ToString(),
                            Email3caption = @dr["Email3"].ToString(),
                            Amountcaption = @dr["Amount"].ToString(),
                            Amount2caption = @dr["Amount2"].ToString(),
                            Amount3caption = @dr["Amount3"].ToString(),
                            Time1caption = @dr["Time1"].ToString(),
                            Time2caption = @dr["Time2"].ToString(),
                            Htmlcaption = @dr["Html"].ToString(),
                            Uploadcaption = @dr["Upload"].ToString(),
                            TextAreacaption = @dr["Textarea"].ToString(),
                            MultiSelect1caption = @dr["Multiselect1"].ToString(),
                            MultiSelect2caption = @dr["Multiselect2"].ToString(),
                            MultiSelect3caption = @dr["Multiselect3"].ToString(),
                            MultiSelect4caption = @dr["Multiselect4"].ToString(),
                            MultiSelect5caption = @dr["Multiselect5"].ToString()
                        });
                    }
                }


                var result = itemsFormLoad;
                return Json(result, JsonRequestBehavior.AllowGet);
            }
            catch (Exception)
            {

                throw;
            }


        }
 public ActionResult Delete_Data(commanbaseParamater CBP)
 {
     try
     {
         DataSet ds = _objCM.BindDropDown(CBP);
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0].Rows[0][0].ToString();
         }
         var result = ViewBag.fname;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public ActionResult DeleteData(commanbaseParamater CBP)
 {
     try
     {
         DataSet ds = _objDCFS.BindDropDown(CBP);
         List<MessagePara> items = new List<MessagePara>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new MessagePara { SrNo = dr["SrNo"].ToString(), msg = dr["msg"].ToString(), help = dr["help"].ToString() });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }