public ActionResult BindGridView(GridParamater GP)
 {
     try
     {
         DataSet ds = _obj_db_UM.BindGrid(GP);
         List<UserMaster> items = new List<UserMaster>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new UserMaster
                 {
                     RowNumber = @dr["RowNumber"].ToString(),
                     srno = @dr["srno"].ToString(),
                     Email = @dr["Email"].ToString(),
                     Name = @dr["Name"].ToString(),
                 });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public ActionResult BindGridView(GridParamater GP)
 {
     try
     {
         DataSet ds = _objwl.BindGrid(GP);
         List<GridFrmControlDisplay> items = new List<GridFrmControlDisplay>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new GridFrmControlDisplay
                 {
                     RowNumber = @dr["RowNumber"].ToString(),
                     CompanyName = @dr["CompanyName"].ToString(),
                     CompanyIndustry = @dr["CompanyIndustry"].ToString(),
                     ApplicationURL = @dr["ApplicationURL"].ToString(),
                     RefferenceCompany = @dr["ReferenceCompany"].ToString(),
                     Srno = @dr["Srno"].ToString()
                 });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public DataSet BindGrid(GridParamater GP)
 {
     try
     {
         _cn = new SqlConnection(ConfigurationManager.ConnectionStrings["gtcon"].ToString());
         _cn.Open();
         SqlCommand _cmd = new SqlCommand("Sp_Grid_RoleMaster", _cn);
         _cmd.CommandType = CommandType.StoredProcedure;
         _cmd.Parameters.AddWithValue("@tablename", GP.tablename);
         _cmd.Parameters.AddWithValue("@Corporate", GP.Corporate);
         _cmd.Parameters.AddWithValue("@unit", GP.unit);
         _cmd.Parameters.AddWithValue("@userid", GP.userid);
         _cmd.Parameters.AddWithValue("@WhereClause", GP.WhereClause);
         _cmd.Parameters.AddWithValue("@Branch", GP.Branch);
         _cmd.Parameters.AddWithValue("@PageNo", GP.PageNo);
         _cmd.Parameters.AddWithValue("@RecordsPerPage", GP.RecordsPerPage);
         _cmd.Parameters.AddWithValue("@Formcode", GP.Formcode);
         _cmd.Parameters.AddWithValue("@Formtabcode", GP.Formtabcode);
         _cmd.Parameters.AddWithValue("@type", GP.type);
         _cmd.Parameters.AddWithValue("@Segment", GP.Segment);
         _cmd.Parameters.AddWithValue("@Field1", GP.Field1);
         _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();
     }
 }
 public ActionResult BindGridUser(GridParamater GP)
 {
     try
     {
         DataSet ds = _objCM.BindGridUser(GP);
         List<GridUserMasterparamater> items = new List<GridUserMasterparamater>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new GridUserMasterparamater
                 {
                     RowNumber = @dr["RowNumber"].ToString(),
                     xmaster = @dr["xmaster"].ToString(),
                     xname = @dr["xname"].ToString(),
                     SrNo = @dr["SrNo"].ToString(),
                 });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public ActionResult BindAccessgrid(GridParamater GP)
 {
     try
     {
         DataSet ds = _obj_db_UM.BindAccessgrid(GP);
         List<UserMaster_AccessRight> items = new List<UserMaster_AccessRight>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new UserMaster_AccessRight
                 {
                     //  Module = @dr["Module"].ToString(),
                     //   Screen = @dr["Screen"].ToString(),
                     //  srno = @dr["srno"].ToString(),
                 });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public ActionResult BindGridView(GridParamater GP)
        {
            try
            {
                DataSet ds = _objCM.BindGrid(GP);
                List<GridAdminparamater> items = new List<GridAdminparamater>();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewBag.fname = ds.Tables[0];
                    foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
                    {
                        items.Add(new GridAdminparamater
                        {
                            RowNumber = @dr["RowNumber"].ToString(),
                            name = @dr["xname"].ToString(),
                            Mastercode = @dr["XMaster"].ToString(),
                            Entry_Level = @dr["ENTRYCONTROL"].ToString(),
                            segment = @dr["SEGMENT"].ToString()

                        });
                    }
                }
                var result = items;
                return Json(result, JsonRequestBehavior.AllowGet);
            }
            catch (Exception)
            {
                throw;
            }
        }
 public ActionResult BindGridView(GridParamater GP)
 {
     try
     {
         DataSet ds = _objDCFS.BindGrid(GP);
         List<GridFromControlDisplay> items = new List<GridFromControlDisplay>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 items.Add(new GridFromControlDisplay
                 {
                     RowNumber = dr["RowNumber"].ToString(),
                     corporate = dr["corporate"].ToString(),
                     Features = dr["Features"].ToString(),
                     Module = dr["Module"].ToString(),
                     Form = dr["Form"].ToString(),
                     Tab = dr["Tab"].ToString(),
                     Section = dr["Section"].ToString(),
                     Controls = dr["Control"].ToString(),
                     Srno = dr["Srno"].ToString()
                 });
             }
         }
         var result = items;
         return Json(result, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }