internal BOMerchantManage SelectmerchantLogin(string Event, string username, string password) { using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.CommandText = "SP_GetMerchantManage"; _sqlcommand.CommandType = CommandType.StoredProcedure; _sqlcommand.Connection = _sqlconnection; _sqlcommand.Parameters.AddWithValue("@username", username); _sqlcommand.Parameters.AddWithValue("@password", password); _sqlcommand.Parameters.AddWithValue("@Event", Event); _sqlconnection.Open(); _sqldataadapter = new SqlDataAdapter(_sqlcommand); _datatable = new DataTable(); _sqldataadapter.Fill(_datatable); _sqlconnection.Close(); BOMerchantManage _bomermng = new BOMerchantManage(); _bomermng = (from list in _datatable.AsEnumerable() select new BOMerchantManage { MerchantId = list.Field <int>("MerchantId"), UserName = list.Field <string>("UserName"), Password = list.Field <string>("Password"), MerchantLevelId = list.Field <int>("MerchantLevelId"), MerchantLevel = list.Field <string>("MerchantLevel"), ActiveStatus = list.Field <bool>("ActiveStatus") }).FirstOrDefault(); return(_bomermng); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); FilldropDowntopCategory(); txtdate.Text = SelectMerchantValidDate(MerchantId).ToString("yyyy-MM-dd"); FillgridViewExamDetail(MerchantId); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); FillTopddlCategory(); FillchkboxListExam(Convert.ToInt32(ddlSecondCategory.SelectedItem.Value), MerchantId); FillchkboxListAccessOption(); FillgridViewUserGroupList(MerchantId); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); GetExtraPermission(_bomerchantDetail.MerchantLevelId); _dtextrapermission = (DataTable)ViewState["extrapermission"]; exists = _dtextrapermission.Select().ToList().Exists(row => row["ExtraPermissionOptId"].ToString() == "5"); if (exists) { pnlCertificate.Visible = true; } FillgridViewExamReport(MerchantId); FillgridViewTemplatePicture(MerchantId); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; if (!IsPostBack) { if (_bomerchantDetail.MerchantLevel == "Free") { menu3.Visible = menu4.Visible = menu5.Visible = menu6.Visible = false; } } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
public List <BOMerchantManage> SelectMerchantDetail(int loginid, BOMerchantManage _bomm) { using (SqlConnection _sqlcon = ConnectionInfo.GetConnection()) { _sqlcommond = new SqlCommand(); _sqlcommond.CommandText = "SP_GetMerchantManage"; _sqlcommond.Connection = _sqlcon; _sqlcommond.CommandType = CommandType.StoredProcedure; _sqlcommond.Parameters.AddWithValue("@MerchantId", loginid); _sqlcommond.Parameters.AddWithValue("@Event", _bomm.Event); _sqlcon.Open(); _sqldataadapter = new SqlDataAdapter(_sqlcommond); DataTable _datatable = new DataTable(); _sqldataadapter.Fill(_datatable); _sqlcon.Close(); List <BOMerchantManage> _merfr = (from cu in _datatable.AsEnumerable() select new BOMerchantManage { MerchantId = cu.Field <int>("MerchantId"), EndDate = cu.Field <DateTime>("EndDate"), MerchantName = cu.Field <string>("MerchantName"), UserName = cu.Field <string>("UserName"), MerchantLevel = cu.Field <string>("MerchantLevel") }).ToList(); return(_merfr); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); if (Request.QueryString["examid"] != null) { ViewState["querystring"] = Common.Decrypt(HttpUtility.UrlDecode(Request.QueryString["examid"])); FillGridviewAllowSales(Convert.ToInt32(ViewState["querystring"])); } } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); FillgridViewWithDraw(MerchantId); lblcurrbal.Text = Convert.ToString(SelectbalanceAmount(MerchantId)); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; merchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); GetExtraPermission(_bomerchantDetail.MerchantLevelId); FilldropDowntopCategory(); FilgirdViewMerchantDetail("GETWITHID", _bomerchantDetail.MerchantId); FillgridViewExamDetail("GetExamWithMId", _bomerchantDetail.MerchantId); if (_bomerchantDetail.MerchantLevel == "Free") { gvExamDetail.Columns[0].Visible = gvExamDetail.Columns[6].Visible = gvExamDetail.Columns[7].Visible = gvExamDetail.Columns[8].Visible = gvExamDetail.Columns[9].Visible = gvExamDetail.Columns[10].Visible = gvExamDetail.Columns[11].Visible = false; } } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { GetExtraPermission(_bomerchantDetail.MerchantLevelId); _dtextrapermission = (DataTable)ViewState["extrapermission"]; exists = _dtextrapermission.Select().ToList().Exists(row => row["ExtraPermissionOptId"].ToString() == "6"); FillgridViewExamDetail("GetExamWithMId", _bomerchantDetail.MerchantId, ""); FillBundleGrid("GetAll", MerchantId); if (_bomerchantDetail.MerchantLevel == "Free") { gvExamDetail.Columns[0].Visible = gvExamDetail.Columns[6].Visible = gvExamDetail.Columns[7].Visible = gvExamDetail.Columns[8].Visible = gvExamDetail.Columns[9].Visible = gvExamDetail.Columns[10].Visible = false; } } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
private void btnLogin_Click(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtPassword.Text)) { BOMerchantManage _boMerchant = _bamermng.SelectMerchantLogin("MerchantLogin", txtUserName.Text, Encryptdata(txtPassword.Text)); if (_boMerchant != null) { if (txtPassword.Text == Decryptdata(_boMerchant.Password)) { MDIfrmMerchantDashboard frm = new MDIfrmMerchantDashboard(_boMerchant.MerchantId); frm.Show(); this.Hide(); } else { MessageBox.Show("Password Invalid"); } } else { MessageBox.Show("Username or Password Invalid"); } } else { MessageBox.Show("Please Enter Correct UserName/Password"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantID = +_bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); FillgridViewShowFinancConfigDetail(MerchantID); FilldropDownPaymentOption(); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
private DateTime SelectMerchantValidDate(int merchantId) { BOMerchantManage _bomermng = new BOMerchantManage(); BAMerchantManage _bamermng = new BAMerchantManage(); DateTime validdate = _bamermng.SelectValiddate("GetValidDate", merchantId); return(validdate); }
protected void btnUpdate_Click(object sender, EventArgs e) { try { if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString()) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); if (fuMerchantPicture.HasFile) { lblPicture.Text = Path.GetFileName(Common.AppendTimeStamp(fuMerchantPicture.PostedFile.FileName)); fuMerchantPicture.PostedFile.SaveAs(Server.MapPath("~/img_merchant/") + lblPicture.Text); } BOMerchantManage _bomerchant = new BOMerchantManage(); BAMerchantManage _bamerchant = new BAMerchantManage(); _bomerchant.MerchantId = merchantId; _bomerchant.MerchantName = txtMerchantName.Text; _bomerchant.UserName = txtUserName.Text; _bomerchant.Password = Common.Encryptdata(txtpassword.Text); if (drpState.SelectedItem != null) { _bomerchant.StateId = Convert.ToInt32(drpState.SelectedItem.Value); } else { _bomerchant.StateId = 0; } _bomerchant.Telephone = txtTelephone.Text; _bomerchant.Brand = txtBrand.Text; _bomerchant.Picture = lblPicture.Text; _bomerchant.About = txtAboutMerchant.Text; _bomerchant.IsActive = true; _bomerchant.IsDelete = false; _bomerchant.StartDate = DateTime.UtcNow; _bomerchant.EndDate = DateTime.UtcNow; _bomerchant.CreatedBy = merchantId; _bomerchant.CreatedDate = DateTime.UtcNow; _bomerchant.UpdatedBy = merchantId; _bomerchant.UpdatedDate = DateTime.UtcNow; _bomerchant.Event = "UpdateBySelf"; int returnvalue = _bamerchant.Update(_bomerchant); if (returnvalue == 2) { ShowMessage("Updated successfully", MessageType.Success); } else if (returnvalue == -2) { ShowMessage("UserName already taken", MessageType.Info); } } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
public int IUDMerchantManage(BOMerchantManage _bomermng) { int returnvalue = default(int); SqlCommand _sqlcommand; using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.Connection = _sqlconnection; _sqlcommand.CommandText = "SP_IUDMerchantManage"; _sqlcommand.CommandType = CommandType.StoredProcedure; _sqlconnection.Open(); _sqlcommand.Parameters.AddWithValue("@MerchantId", _bomermng.MerchantId); _sqlcommand.Parameters.AddWithValue("@MerchantName", _bomermng.MerchantName); _sqlcommand.Parameters.AddWithValue("@UserName", _bomermng.UserName); _sqlcommand.Parameters.AddWithValue("@Password", _bomermng.Password); _sqlcommand.Parameters.AddWithValue("@StateId", _bomermng.StateId); _sqlcommand.Parameters.AddWithValue("@Telephone", _bomermng.Telephone); _sqlcommand.Parameters.AddWithValue("@MerchantLevelId", _bomermng.MerchantLevelId); _sqlcommand.Parameters.AddWithValue("@StartDate", _bomermng.StartDate); _sqlcommand.Parameters.AddWithValue("@EndDate", _bomermng.EndDate); _sqlcommand.Parameters.AddWithValue("@ActiveStatus", _bomermng.ActiveStatus); _sqlcommand.Parameters.AddWithValue("@IsActive", _bomermng.IsActive); _sqlcommand.Parameters.AddWithValue("@IsDelete", _bomermng.IsDelete); _sqlcommand.Parameters.AddWithValue("@CreatedBy", _bomermng.CreatedBy); _sqlcommand.Parameters.AddWithValue("@CreatedDate", _bomermng.CreatedDate); _sqlcommand.Parameters.AddWithValue("@UpdatedBy", _bomermng.UpdatedBy); _sqlcommand.Parameters.AddWithValue("@UpdatedDate", _bomermng.UpdatedDate); _sqlcommand.Parameters.AddWithValue("@EmailId", _bomermng.EmailId); _sqlcommand.Parameters.AddWithValue("@Brand", _bomermng.Brand); _sqlcommand.Parameters.AddWithValue("@Picture", _bomermng.Picture); _sqlcommand.Parameters.AddWithValue("@About", _bomermng.About); _sqlcommand.Parameters.AddWithValue("@Event", _bomermng.Event); _sqlcommand.Parameters.AddWithValue("@returnValue", 0).Direction = System.Data.ParameterDirection.InputOutput; try { _sqlcommand.ExecuteNonQuery(); returnvalue = Convert.ToInt32(_sqlcommand.Parameters["@returnValue"].Value); } catch (Exception ex) { Common.LogError(ex); } finally { _sqlconnection.Close(); _sqlcommand.Dispose(); } } return(returnvalue); }
protected void btnMerchantLogin_Click(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(txtMerchantemailLogin.Text) && !string.IsNullOrEmpty(txtMerchantpwdLogin.Text)) { BOMerchantManage _bomerchantDetail = _bamermng.SelectMerchantLogin("MerchantLogin", txtMerchantemailLogin.Text, Encryptdata(txtMerchantpwdLogin.Text)); if (_bomerchantDetail != null) { if (txtMerchantpwdLogin.Text == Decryptdata(_bomerchantDetail.Password)) { if (_bomerchantDetail.ActiveStatus) { Session["Merchantid"] = _bomerchantDetail.MerchantId; Session["merchantDetail"] = _bomerchantDetail; if (Session["Merchantid"] != null) { Response.Redirect("http://localhost:60956/MerchantLogin.aspx", false); } } else { lblerror.InnerText = "Your account is currently not active. Contact your administrator to activate it."; lblerror.Attributes.Add("Style", "display: block;color: #D8000C;"); } } else { lblerror.InnerText = "Password invalid"; lblerror.Attributes.Add("Style", "display: block;color: #D8000C;"); txtMerchantpwdLogin.Focus(); } } else { lblerror.InnerText = "Username or Password invalid"; lblerror.Attributes.Add("Style", "display: block;color: #D8000C;"); txtMerchantemailLogin.Focus(); } } else { lblerror.InnerText = "Please Enter Correct UserName/Password"; lblerror.Attributes.Add("Style", "display: block;color: #D8000C;"); txtMerchantemailLogin.Focus(); } } catch (Exception ex) { Common.LogError(ex); lblerror.InnerText = "Server not respond"; lblerror.Attributes.Add("Style", "display: block;color: #D8000C;"); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Tab_1.CssClass = "Clicked"; MainView.ActiveViewIndex = 0; Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); FillddlUserGroup(MerchantId); FillddlTopCategoryUser(FillddlTopCategory()); if (ddlSecondCategory.Items.Count != 0) { FillchkboxListExam(Convert.ToInt32(ddlSecondCategory.SelectedItem.Value), MerchantId); } GetExtraPermission(_bomerchantDetail.MerchantLevelId); _dtextrapermission = (DataTable)ViewState["extrapermission"]; FillchkboxListAccessOptionUser(_dtextrapermission); FillgridViewUserList(MerchantId); FillgridViewUserGroupList(MerchantId); } if (ViewState["dtlistitem"] == null) { dtlistitem.Columns.Add(new DataColumn("Item")); dtlistitem.Columns.Add(new DataColumn("Id")); ViewState["dtlistitem"] = dtlistitem; dvlistitem = new DataView(dtlistitem); } if (ViewState["dtlistitemgrp"] == null) { dtlistitemgrp.Columns.Add(new DataColumn("Item")); dtlistitemgrp.Columns.Add(new DataColumn("Id")); ViewState["dtlistitemgrp"] = dtlistitemgrp; dvlistitemgrp = new DataView(dtlistitemgrp); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
protected void Page_Load(object sender, EventArgs e) { try { // Imagewatermark("img_20180125114321342.png", "Shailendra Kumrawat", DateTime.Now.ToString("dd/MM/yyyy"), 195, 214, 142, 365); if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); if (Request.QueryString["exmrptid"].ToString() != null && Request.QueryString["name"].ToString() != null && Request.QueryString["crtficid"].ToString() != null) { string concat = Request.QueryString["exmrptid"].ToString(); concat += " " + Request.QueryString["name"].ToString(); concat += " " + Request.QueryString["crtficid"].ToString(); int rptid = Convert.ToInt32(Request.QueryString["exmrptid"]); int certid = Convert.ToInt32(Request.QueryString["crtficid"].ToString()); DataTable _datatable2 = new DataTable(); _datatable2 = _baexmrpt.SelectExamreport("GetExamRptID", rptid); DataTable _datatable3 = new DataTable(); _datatable3 = _bamercertfict.SelectCertifcateDetailWithID("GetCertificateWithCId", certid); string namefield = _datatable3.Rows[0]["NameBox"].ToString(); string[] nameareavalue = namefield.Split(','); string datefiled = _datatable3.Rows[0]["DateBox"].ToString(); string[] dateareavalue = datefiled.Split(','); imgcertificate.ImageUrl = "~/TemplateImage/" + _datatable3.Rows[0]["CertificatePic"].ToString(); Imagewatermark(_datatable3.Rows[0]["CertificatePic"].ToString(), Request.QueryString["name"].ToString(), DateTime.Now.ToString("dd/MM/yyyy"), Convert.ToInt32(nameareavalue[0]), Convert.ToInt32(nameareavalue[1]), Convert.ToInt32(dateareavalue[0]), Convert.ToInt32(dateareavalue[1])); } } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
private void FillMerchantDetail(BOMerchantManage _bomermng) { txtMerchantName.Text = _bomermng.MerchantName; txtEmailId.Text = _bomermng.EmailId; txtUserName.Text = _bomermng.UserName; txtpassword.Text = Common.Decryptdata(_bomermng.Password); txtMerchantLevel.Text = _bomermng.MerchantLevel; txtValidDate.Text = _bomermng.EndDate.ToString("yyyy-MM-dd"); drpState.SelectedValue = _bomermng.StateId.ToString(); drpCountry.SelectedValue = _bomermng.CountryId.ToString(); txtTelephone.Text = _bomermng.Telephone; txtBrand.Text = _bomermng.Brand; lblPicture.Text = _bomermng.Picture; txtAboutMerchant.Text = _bomermng.About; lnkbtnUpdate.OnClientClick = String.Format("return getConfirmation(this,'{0}','{1}');", "Please confirm", "Are you sure you want to update this details?"); }
internal BOMerchantManage SelectmerchantLogin(string Event, string emailid, string password) { using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.CommandText = "SP_GetMerchantManage"; _sqlcommand.CommandType = CommandType.StoredProcedure; _sqlcommand.Connection = _sqlconnection; _sqlcommand.Parameters.AddWithValue("@emailid", emailid); _sqlcommand.Parameters.AddWithValue("@password", password); _sqlcommand.Parameters.AddWithValue("@Event", Event); _sqlconnection.Open(); _sqldataadapter = new SqlDataAdapter(_sqlcommand); _datatable = new DataTable(); _sqldataadapter.Fill(_datatable); _sqlconnection.Close(); BOMerchantManage _bomermng = new BOMerchantManage(); _bomermng = (from list in _datatable.AsEnumerable() select new BOMerchantManage { MerchantId = list.Field <int>("MerchantId"), MerchantName = list.Field <string>("MerchantName"), EmailId = list.Field <string>("EmailId"), UserName = list.Field <string>("UserName"), Password = list.Field <string>("Password"), MerchantLevelId = list.Field <int?>("MerchantLevelId") == null ? 0 : list.Field <int>("MerchantLevelId"), MerchantLevel = list.Field <string>("MerchantLevel"), ActiveStatus = list.Field <bool>("ActiveStatus"), EndDate = list.Field <DateTime>("EndDate"), StateId = list.Field <int?>("StateId") == null ? 0 : list.Field <int>("StateId"), CountryId = list.Field <int?>("CountryId") == null ? 0 : list.Field <int>("CountryId"), Telephone = list.Field <string>("Telephone"), Brand = list.Field <string>("Brand"), Picture = list.Field <string>("Picture"), About = list.Field <string>("About") }).FirstOrDefault(); return(_bomermng); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Session["Merchantid"] != null) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); FilldrpCountry(); BAMerchantManage _bamermng = new BAMerchantManage(); BOMerchantManage mnag = (BOMerchantManage)Session["merchantDetail"]; BOMerchantManage _bomerchantDetail = _bamermng.SelectMerchantLogin("MerchantLogin", mnag.EmailId, mnag.Password); merchantId = _bomerchantDetail.MerchantId; FillMerchantDetail(_bomerchantDetail); } else { Response.Redirect("Default.aspx", false); } } }
protected void MerchantLevelUpdate(int levelid) { try { if (Session["CheckRefresh"].ToString() == ViewState["CheckRefresh"].ToString()) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); BOMerchantManage _bomerchant = new BOMerchantManage(); BAMerchantManage _bamerchant = new BAMerchantManage(); _bomerchant.MerchantId = Convert.ToInt32(Common.Decryptdata(ViewState["mid"].ToString())); _bomerchant.MerchantLevelId = levelid; _bomerchant.MerchantName = ""; _bomerchant.UserName = ""; _bomerchant.Password = ""; _bomerchant.StateId = 0; _bomerchant.Telephone = ""; _bomerchant.Brand = ""; _bomerchant.Picture = ""; _bomerchant.About = ""; _bomerchant.IsActive = true; _bomerchant.IsDelete = false; _bomerchant.StartDate = DateTime.UtcNow; _bomerchant.EndDate = DateTime.UtcNow; _bomerchant.CreatedBy = 0; _bomerchant.CreatedDate = DateTime.UtcNow; _bomerchant.UpdatedBy = 0; _bomerchant.UpdatedDate = DateTime.UtcNow; _bomerchant.Event = "UpdateLevelAfterRegistrer"; int returnvalue = _bamerchant.Update(_bomerchant); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
public int UpdateMerchantLevel(BOMerchantManage _bomermng) { int returnValue = default(int); SqlCommand _sqlcommnd; using (SqlConnection _sqlconnection = ConnectionInfo.GetConnection()) { _sqlcommnd = new SqlCommand(); _sqlcommnd.Connection = _sqlconnection; _sqlcommnd.CommandText = "SP_IUDMerchantManage"; _sqlcommnd.CommandType = CommandType.StoredProcedure; _sqlconnection.Open(); _sqlcommnd.Parameters.AddWithValue("@MerchantId", _bomermng.MerchantId); _sqlcommnd.Parameters.AddWithValue("@MerchantLevelId", _bomermng.MerchantLevelId); _sqlcommnd.Parameters.AddWithValue("@UpdatedBy", _bomermng.UpdatedBy); _sqlcommnd.Parameters.AddWithValue("@UpdatedDate", _bomermng.UpdatedDate); _sqlcommnd.Parameters.AddWithValue("@Event", _bomermng.Event); _sqlcommnd.Parameters.AddWithValue("@returnValue", 0).Direction = System.Data.ParameterDirection.InputOutput; try { _sqlcommnd.ExecuteNonQuery(); returnValue = Convert.ToInt32(_sqlcommnd.Parameters["@returnValue"].Value); } catch (Exception ex) { Common.LogError(ex); } finally { _sqlconnection.Close(); _sqlcommnd.Dispose(); } } return(returnValue); }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["merchantDetail"] != null) { BOMerchantManage _bomerchantDetail = (BOMerchantManage)Session["merchantDetail"]; MerchantId = _bomerchantDetail.MerchantId; if (!IsPostBack) { FillgridViewSalesReports(MerchantId); } } else { Response.Redirect("Default.aspx", false); } } catch (Exception ex) { Common.LogError(ex); ShowMessage("Some technical error", MessageType.Warning); } }
public List <BOMerchantManage> SelectMerchantManage(BOMerchantManage _bomermng) { SqlCommand _sqlcommand; SqlDataAdapter _sqlDataAdapter; using (SqlConnection _con = ConnectionInfo.GetConnection()) { _sqlcommand = new SqlCommand(); _sqlcommand.CommandText = "SP_GetMerchantManage"; _sqlcommand.CommandType = System.Data.CommandType.StoredProcedure; _sqlcommand.Connection = _con; _con.Open(); _sqlcommand.Parameters.AddWithValue("@Event", _bomermng.Event); _sqlDataAdapter = new SqlDataAdapter(_sqlcommand); DataTable _dataTable = new DataTable(); _sqlDataAdapter.Fill(_dataTable); List <BOMerchantManage> _merfr = (from cu in _dataTable.AsEnumerable() select new BOMerchantManage { MerchantId = cu.Field <int>("MerchantId"), MerchantName = cu.Field <string>("MerchantName"), Country = cu.Field <string>("Country"), State = cu.Field <string>("State"), Telephone = cu.Field <string>("Telephone"), MerchantLevel = cu.Field <string>("MerchantLevel"), StartDate = cu.Field <DateTime>("StartDate"), EndDate = cu.Field <DateTime>("EndDate"), ActiveStatus = cu.Field <bool>("ActiveStatus"), IsActive = cu.Field <bool>("IsActive") }).ToList(); _con.Close(); return(_merfr); } }
public int UpdateStatus(BOMerchantManage _bomermng) { return(_damermng.UpdateStatus(_bomermng)); }
public int UpdateMerchantLevel(BOMerchantManage _bomermng) { return(_damermng.UpdateMerchantLevel(_bomermng)); }
public int Update(BOMerchantManage _bomermng) { return(_damchntmng.IUDMerchantManage(_bomermng)); }
public int Insert(BOMerchantManage _bomermng) { return(_damchntmng.IUDMerchantManage(_bomermng)); }
public List <BOMerchantManage> SelectMerchantDetail(int loginid, BOMerchantManage _bomer) { return(_damermng.SelectMerchantDetail(loginid, _bomer)); }