public ActionResult insert_Data(WhitelabelReg WR) { try { DataSet ds = _objwl.insert_data(WR); if (ds.Tables[0].Rows.Count > 0) { ViewBag.srno = ds.Tables[0].Rows[0]["Srno"]; ViewBag.Message = ds.Tables[0].Rows[0]["msg"]; if (ds.Tables[0].Rows[0]["Help"].ToString() == "Save" || ds.Tables[0].Rows[0]["Help"].ToString() == "Update") { ViewBag.Event = "success"; } else if (ds.Tables[0].Rows[0]["Help"].ToString() == "Duplicate") { ViewBag.Event = "error"; } } return Json(new { srno = ViewBag.srno, Event = ViewBag.Event, responseText = ViewBag.Message }, JsonRequestBehavior.AllowGet); } catch (Exception) { throw; } }
public ActionResult Binddropdowntab6(WhitelabelReg WR) { try { DataSet ds = _objwl.Binddropdowntab6(WR); List<CommanDropdown> itemsdrp = new List<CommanDropdown>(); if (ds.Tables[0].Rows.Count > 0) { ViewBag.fname = ds.Tables[0]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemsdrp.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result = itemsdrp; return Json(new { UPdrp = result }, JsonRequestBehavior.AllowGet); } catch (Exception) { throw; } }
public ActionResult Binddropdowntab3(WhitelabelReg WR) { try { DataSet ds = _objwl.Binddropdowntab3(WR); List<CommanDropdown> itemcloudprovider = new List<CommanDropdown>(); List<CommanDropdown> itemcloudserver = new List<CommanDropdown>(); List<CommanDropdown> itemcndprovider = new List<CommanDropdown>(); List<CommanDropdown> itemcurrency = new List<CommanDropdown>(); if (ds.Tables[0].Rows.Count > 0) { ViewBag.fname = ds.Tables[0]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcloudprovider.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result = itemcloudprovider; if (ds.Tables[1].Rows.Count > 0) { ViewBag.fname = ds.Tables[1]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcloudserver.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result1 = itemcloudserver; if (ds.Tables[2].Rows.Count > 0) { ViewBag.fname = ds.Tables[2]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcndprovider.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result2 = itemcndprovider; if (ds.Tables[3].Rows.Count > 0) { ViewBag.fname = ds.Tables[3]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcurrency.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result3 = itemcurrency; DataSet ds1 = _objwl.Binddropdowntab3sec2(WR); List<CommanDropdown> itemcloudprovider1 = new List<CommanDropdown>(); List<CommanDropdown> itemcloudserver1 = new List<CommanDropdown>(); List<CommanDropdown> itemcndprovider1 = new List<CommanDropdown>(); List<CommanDropdown> itemcurrency1 = new List<CommanDropdown>(); if (ds1.Tables[0].Rows.Count > 0) { ViewBag.fname = ds1.Tables[0]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcloudprovider1.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result4 = itemcloudprovider1; if (ds1.Tables[1].Rows.Count > 0) { ViewBag.fname = ds1.Tables[1]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcloudserver1.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result5 = itemcloudserver1; if (ds1.Tables[2].Rows.Count > 0) { ViewBag.fname = ds1.Tables[2]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcndprovider1.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result6 = itemcndprovider1; if (ds1.Tables[3].Rows.Count > 0) { ViewBag.fname = ds1.Tables[3]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { itemcurrency1.Add(new CommanDropdown { Text = dr["xname"].ToString(), Value = dr["xcode"].ToString() }); } } var result7 = itemcurrency1; return Json(new { UPdrpc = result1, UPdrp = result, Ucountry = result2, Ucurrency = result3, UPdrpc4 = result4, UPdrp5 = result5, Ucountry6 = result6, Ucurrency7 = result7 }, JsonRequestBehavior.AllowGet); } catch (Exception) { throw; } }
public ActionResult Edit_Data(WhitelabelReg WR) { try { DataSet ds = _objwl.Edit_data(WR); List<WhitelabelReg> WhitelabelReg = new List<WhitelabelReg>(); if (ds.Tables[0].Rows.Count > 0) { ViewBag.fname = ds.Tables[0]; foreach (System.Data.DataRow dr in ViewBag.fname.Rows) { WhitelabelReg.Add(new WhitelabelReg { srno = dr["srno"].ToString(), CorpCoOfficialName = dr["CorpCoOfficialName"].ToString(), CorpCompanyIndust = dr["CorpCompanyIndust"].ToString(), CompanyType = dr["CompanyType"].ToString(), Services = dr["Services"].ToString(), BusinessMode = dr["BusinessMode"].ToString(), AdminUserName = dr["AdminUserName"].ToString(), Password = dr["Password"].ToString(), ApplicationTheme = dr["ApplicationTheme"].ToString(), ApplicationUrl = dr["ApplicationUrl"].ToString(), WebTheme = dr["WebTheme"].ToString(), WebUrl = dr["WebUrl"].ToString(), BaseCurrency = dr["BaseCurrency"].ToString(), BaseLanguage = dr["BaseLanguage"].ToString(), Logo = dr["Logo"].ToString(), Favicon = dr["Favicon"].ToString(), OfficialEmail = dr["OfficialEmail"].ToString(), OfficialPhone = dr["OfficialPhone"].ToString(), FullSemiWhiteLbl = dr["FullSemiWhiteLbl"].ToString(), CopyrightNote = dr["CopyrightNote"].ToString(), CopyrightNoteFlag = dr["CopyrightNoteFlag"].ToString(), RefCorpCompany = dr["RefCorpCompany"].ToString(), OtherReference1 = dr["OtherReference1"].ToString(), OtherReference2 = dr["OtherReference2"].ToString(), Commision = dr["Commision"].ToString(), OtherLanguage = dr["OtherLanguage"].ToString(), Facebook = dr["Facebook"].ToString(), Twitter = dr["Twitter"].ToString(), GooglePlus = dr["GooglePlus"].ToString(), WebPortal = dr["WebPortal"].ToString(), BackgroundImg = dr["BackgroundImg"].ToString(), LoginFrmCaption = dr["LoginFrmCaption"].ToString() }); } } var result = WhitelabelReg; return Json(new { Whiteregjs = result }, JsonRequestBehavior.AllowGet); } catch (Exception) { throw; } }
public DataSet Binddropdowntab6(WhitelabelReg WR) { try { _cn.Open(); SqlCommand _cmd = new SqlCommand("sp_Formload_PasswordConfiguration", _cn); _cmd.CommandType = CommandType.StoredProcedure; _cmd.Parameters.AddWithValue("@Module", WR.Module); _cmd.Parameters.AddWithValue("@screen", WR.screen); _cmd.Parameters.AddWithValue("@FormCode", WR.FormCode); _cmd.Parameters.AddWithValue("@TabCode", WR.TabCode); _cmd.Parameters.AddWithValue("@Corporate", WR.Corporate); _cmd.Parameters.AddWithValue("@unit", WR.unit); _cmd.Parameters.AddWithValue("@Branch", WR.Branch); _cmd.Parameters.AddWithValue("@userid", WR.userid); _cmd.Parameters.AddWithValue("@Ip", WR.Ip); _cmd.Parameters.AddWithValue("@Type", WR.Type); _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 DataSet Binddropdowntab3sec2(WhitelabelReg WR) { try { using (SqlConnection sconn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["gtcon"].ConnectionString)) { sconn.Open(); using (SqlCommand _cmd = new SqlCommand("sp_Formload_White_Register_Subscription", sconn)) { _cmd.CommandType = CommandType.StoredProcedure; _cmd.Parameters.AddWithValue("@Module", WR.Module); _cmd.Parameters.AddWithValue("@screen", WR.screen); _cmd.Parameters.AddWithValue("@FormCode", WR.FormCode); _cmd.Parameters.AddWithValue("@TabCode", WR.TabCode); _cmd.Parameters.AddWithValue("@Corporate", WR.Corporate); _cmd.Parameters.AddWithValue("@unit", WR.unit); _cmd.Parameters.AddWithValue("@Branch", WR.Branch); _cmd.Parameters.AddWithValue("@userid", WR.userid); _cmd.Parameters.AddWithValue("@Ip", WR.Ip); _cmd.Parameters.AddWithValue("@Type", WR.Type); _cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter _adp = new SqlDataAdapter(_cmd); DataSet _ds = new DataSet(); _adp.Fill(_ds); _adp.Dispose(); _cmd.Dispose(); sconn.Close(); sconn.Dispose(); return _ds; } } } catch (Exception ex) { throw ex; } finally { } }
public DataSet Bindbillingstate(WhitelabelReg WR) { try { _cn.Open(); SqlCommand _cmd = new SqlCommand("sp_Base_White_Register_MaintanenceSupport", _cn); _cmd.CommandType = CommandType.StoredProcedure; _cmd.Parameters.AddWithValue("@srno", WR.srno); _cmd.Parameters.AddWithValue("@Module", WR.Module); _cmd.Parameters.AddWithValue("@screen", WR.screen); _cmd.Parameters.AddWithValue("@FormCode", WR.FormCode); _cmd.Parameters.AddWithValue("@TabCode", WR.TabCode); _cmd.Parameters.AddWithValue("@Corporate", WR.Corporate); _cmd.Parameters.AddWithValue("@unit", WR.unit); _cmd.Parameters.AddWithValue("@Branch", WR.Branch); _cmd.Parameters.AddWithValue("@userid", WR.userid); _cmd.Parameters.AddWithValue("@Ip", WR.Ip); _cmd.Parameters.AddWithValue("@Type", WR.Type); _cmd.Parameters.AddWithValue("@field1", WR.Field1); _cmd.Parameters.AddWithValue("@field2", WR.Field2); _cmd.Parameters.AddWithValue("@field3", WR.Field3); _cmd.Parameters.AddWithValue("@field4", WR.Field4); _cmd.Parameters.AddWithValue("@field5", WR.Field5); _cmd.Parameters.AddWithValue("@Control", WR.Control); _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 DataSet Edit_data(WhitelabelReg WR) { try { _cn.Open(); SqlCommand _cmd = new SqlCommand("sp_Edit_White_Register_Basic", _cn); _cmd.CommandType = CommandType.StoredProcedure; _cmd.Parameters.AddWithValue("@tablename", "0"); _cmd.Parameters.AddWithValue("@Corporate", WR.Corporate); _cmd.Parameters.AddWithValue("@unit", "0"); _cmd.Parameters.AddWithValue("@Formcode", "0"); _cmd.Parameters.AddWithValue("@Formtabcode", "0"); _cmd.Parameters.AddWithValue("@srno", WR.srno); _cmd.Parameters.AddWithValue("@Type", "EditMode"); _cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter _adp = new SqlDataAdapter(_cmd); DataSet _ds = new DataSet(); _adp.Fill(_ds); _adp.Dispose(); _cmd.Dispose(); return _ds; } catch (Exception) { throw; } finally { _cn.Close(); _cn.Dispose(); } }
public DataSet insert_data(WhitelabelReg WR) { try { _cn.Open(); SqlCommand _cmd = new SqlCommand("sp_save_White_Register_Basic", _cn); _cmd.CommandType = CommandType.StoredProcedure; _cmd.Parameters.AddWithValue("@srno", WR.srno); _cmd.Parameters.AddWithValue("@Corporate", WR.Corporate); _cmd.Parameters.AddWithValue("@CorpCoOfficialName", WR.CorpCoOfficialName); _cmd.Parameters.AddWithValue("@CorpCompanyIndust", WR.CorpCompanyIndust); _cmd.Parameters.AddWithValue("@CompanyType", WR.CompanyType); _cmd.Parameters.AddWithValue("@Services", WR.Services); _cmd.Parameters.AddWithValue("@BusinessMode", WR.BusinessMode); _cmd.Parameters.AddWithValue("@AdminUserName", WR.AdminUserName); _cmd.Parameters.AddWithValue("@Password", WR.Password); _cmd.Parameters.AddWithValue("@ApplicationTheme", WR.ApplicationTheme); _cmd.Parameters.AddWithValue("@ApplicationUrl", WR.ApplicationUrl); _cmd.Parameters.AddWithValue("@WebTheme", WR.WebTheme); _cmd.Parameters.AddWithValue("@WebUrl", WR.WebUrl); _cmd.Parameters.AddWithValue("@BaseCurrency", WR.BaseCurrency); _cmd.Parameters.AddWithValue("@BaseLanguage", WR.BaseLanguage); _cmd.Parameters.AddWithValue("@OtherLanguage", WR.OtherLanguage); _cmd.Parameters.AddWithValue("@Logo", WR.Logo); _cmd.Parameters.AddWithValue("@Favicon", WR.Favicon); _cmd.Parameters.AddWithValue("@OfficialEmail", WR.OfficialEmail); _cmd.Parameters.AddWithValue("@OfficialPhone", WR.OfficialPhone); _cmd.Parameters.AddWithValue("@FullSemiWhiteLbl", WR.FullSemiWhiteLbl); _cmd.Parameters.AddWithValue("@CopyrightNote", WR.CopyrightNote); _cmd.Parameters.AddWithValue("@CopyrightNoteFlag", WR.CopyrightNoteFlag); _cmd.Parameters.AddWithValue("@LoginFrmCaption", WR.LoginFrmCaption); _cmd.Parameters.AddWithValue("@DefaultLogo", WR.DefaultLogo); _cmd.Parameters.AddWithValue("@RefCorpCompany", WR.RefCorpCompany); _cmd.Parameters.AddWithValue("@OtherReference1", WR.OtherReference1); _cmd.Parameters.AddWithValue("@OtherReference2", WR.OtherReference2); _cmd.Parameters.AddWithValue("@Commision", WR.Commision); _cmd.Parameters.AddWithValue("@Facebook", WR.Facebook); _cmd.Parameters.AddWithValue("@Twitter", WR.Twitter); _cmd.Parameters.AddWithValue("@GooglePlus", WR.GooglePlus); _cmd.Parameters.AddWithValue("@WebPortal", WR.WebPortal); _cmd.Parameters.AddWithValue("@BackgroundImg", WR.BackgroundImg); _cmd.Parameters.AddWithValue("@Attribute1", WR.Attribute1); _cmd.Parameters.AddWithValue("@Attribute2", WR.Attribute2); _cmd.Parameters.AddWithValue("@Attribute3", WR.Attribute3); _cmd.Parameters.AddWithValue("@Attribute4", WR.Attribute4); _cmd.Parameters.AddWithValue("@Attribute5", WR.Attribute5); _cmd.Parameters.AddWithValue("@Attribute6", WR.Attribute6); _cmd.Parameters.AddWithValue("@Attribute7", WR.Attribute7); _cmd.Parameters.AddWithValue("@Attribute8", WR.Attribute8); _cmd.Parameters.AddWithValue("@Attribute9", WR.Attribute9); _cmd.Parameters.AddWithValue("@Attribute10", WR.Attribute10); _cmd.Parameters.AddWithValue("@CretedBy", WR.CreatedBy); _cmd.Parameters.AddWithValue("@CorpcentreBy", WR.CorpcentreBy); _cmd.Parameters.AddWithValue("@UnitCorpBy", WR.UnitCorpBy); _cmd.Parameters.AddWithValue("@TerminalBy", WR.TerminalBy); _cmd.Parameters.AddWithValue("@BranchBy", WR.BranchBy); SqlDataAdapter adp = new SqlDataAdapter(_cmd); DataSet ds = new DataSet(); adp.Fill(ds); adp.Dispose(); _cmd.Dispose(); return ds; } catch { throw; } finally { _cn.Close(); _cn.Dispose(); } }