protected void Page_Load(object sender, EventArgs e) { if (Session["CLIENT_ID"] == null || Session["CLIENT_ID"] == "") { Response.Redirect("../"); } else { if (Request.QueryString["rid"] != "" && Request.QueryString["rid"] != null) { requestid = Convert.ToInt32(MyExtenstionMethods.DecryptString(Request.QueryString["rid"].ToString())); hndrid.Value = Request.QueryString["rid"].ToString(); } if (Session["CLIENT_ID"] != "" && Session["CLIENT_ID"] != null && Session["CLIENT_ID"] != "0") { clientid = Convert.ToInt32(Session["CLIENT_ID"].ToString()); hndcid.Value = MyExtenstionMethods.EncryptString(clientid.ToString()); SetDate(); int Outstandingamount = crmObj.GetClientOutstanding(clientid); if (Outstandingamount > 0) { diverror.InnerText = "Your Pending amount is Rs " + Outstandingamount.ToString() + " Will be added in Service fee/ Cash Handling charges"; txtoutstanding.Text = Outstandingamount.ToString(); } } else { Response.Redirect("../Signin/"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Session != null) { if (Session["CLIENT_NAME"] == null || Session["CLIENT_NAME"] == "") { Response.Redirect("../"); } } string clientid = "0"; try { if (Session["CLIENT_ID"] != "" && Session["CLIENT_ID"] != null && Session["CLIENT_ID"] != "0") { clientid = Session["CLIENT_ID"].ToString(); hndcid.Value = clientid; txtcid.Text = clientid; int Outstandingamount = crmObj.GetClientOutstanding(Convert.ToInt32(clientid)); if (Outstandingamount > 0) { diverror.InnerText = "Your Pending amount is Rs " + Outstandingamount.ToString() + " Will be added in Service fee/ Cash Handling charges"; txtoutstanding.Text = Outstandingamount.ToString(); } } else { Response.Redirect("../Signin/"); } // For Vrification Code.. if (Session["Vcode"] != "" && Session["Vcode"] != null && Session["Vcode"] != "0") { hdnVcode.Value = Session["Vcode"].ToString(); } DataSet DsClientInfo = new DataSet(); DsClientInfo = crmObj.Display_Data_BindForEditCrm("CLIENTDATA", Convert.ToInt32(Session["CLIENT_ID"])); int HasData = 0; if (DsClientInfo.Tables.Count > 0) { if (DsClientInfo.Tables[0].Rows.Count > 0) { try { walletbalance.InnerHtml = DsClientInfo.Tables[0].Rows[0].ItemArray[3].ToString(); txtwall.Text = DsClientInfo.Tables[0].Rows[0].ItemArray[3].ToString(); } catch (Exception e344) { walletbalance.InnerHtml = "0"; } DataSet DsAdd = new DataSet(); DsAdd = crmObj.GetAdditionalAddress(Convert.ToInt32(Session["CLIENT_ID"].ToString())); if (DsAdd.Tables.Count > 0) { if (DsAdd.Tables[0].Rows.Count > 0) { string straddress = "<div class='col-md-12'><span class='pull-right' onclick='hideaddress()'><i class='fa fa-times'></i></span></div>"; int i = 0; for (i = 0; i <= DsAdd.Tables[0].Rows.Count - 1; i++) { string Name = DsAdd.Tables[0].Rows[i].ItemArray[1].ToString(); string Mobie = DsAdd.Tables[0].Rows[i].ItemArray[7].ToString(); string AddressLine = DsAdd.Tables[0].Rows[i].ItemArray[2].ToString(); string Area = DsAdd.Tables[0].Rows[i].ItemArray[10].ToString(); string Pincode = DsAdd.Tables[0].Rows[i].ItemArray[6].ToString(); string Landmark = DsAdd.Tables[0].Rows[i].ItemArray[5].ToString(); string passstring = Name.Replace(" ", "~").Sanatize() + "@" + Mobie + "@" + AddressLine.Replace(" ", "~").Sanatize() + "@" + Area + "@" + Pincode + "@" + Landmark.Replace(" ", "~").Sanatize(); straddress = straddress + "<div class='row' style='padding-right:10px;'>"; straddress = straddress + "<div class='col-md-7 col-md-offset-1 mt20 address' style='border-top:1px solid #ccc;padding-top:10px;' >"; straddress = straddress + "<h3>" + DsAdd.Tables[0].Rows[i].ItemArray[1].ToString() + " | Mob No : +91 " + DsAdd.Tables[0].Rows[i].ItemArray[7].ToString() + "</h3>"; straddress = straddress + "<h3>" + DsAdd.Tables[0].Rows[i].ItemArray[2].ToString() + " " + DsAdd.Tables[0].Rows[i].ItemArray[3].ToString() + "</h3>"; straddress = straddress + "<h3>" + DsAdd.Tables[0].Rows[i].ItemArray[4].ToString() + " - " + DsAdd.Tables[0].Rows[i].ItemArray[6].ToString() + ".</h3>"; straddress = straddress + "<div class='col-md-12'>"; straddress = straddress + "<button type='button' class='btn-gray mt10' onclick=BackToAddressPlace('" + Server.HtmlEncode(passstring) + "')>Use This Address</button>"; straddress = straddress + "</div>"; straddress = straddress + "</div>"; straddress = straddress + "<div class='col-md-4 mt20' >"; //straddress = straddress + "<span><i class='fa fa-trash-o'></i> Remove</span>"; //straddress = straddress + "<span><i class='fa fa-pencil'></i> Edit</span>"; straddress = straddress + "</div>"; straddress = straddress + "</div>"; } addressplace.InnerHtml = straddress; } } } } } catch (Exception e1) { } } //END }
public void setdata() { DataSet DsAdd = new DataSet(); DsAdd = crmObj.GetAdditionalAddress(Convert.ToInt32(Session["CLIENT_ID"].ToString())); if (DsAdd.Tables.Count > 0) { string straddress = ""; if (DsAdd.Tables[0].Rows.Count > 0) { int i = 0; for (i = 0; i <= DsAdd.Tables[0].Rows.Count - 1; i++) { string aid = DsAdd.Tables[0].Rows[i].ItemArray[0].ToString().Sanatize(); string Name = DsAdd.Tables[0].Rows[i].ItemArray[1].ToString().Sanatize(); string Mobie = DsAdd.Tables[0].Rows[i].ItemArray[7].ToString().Sanatize(); string AddressLine = DsAdd.Tables[0].Rows[i].ItemArray[2].ToString().Sanatize(); string Areaid = DsAdd.Tables[0].Rows[i].ItemArray[10].ToString().Sanatize(); string Area = DsAdd.Tables[0].Rows[i].ItemArray[8].ToString().Sanatize(); string Pincode = DsAdd.Tables[0].Rows[i].ItemArray[6].ToString().Sanatize(); string Landmark = DsAdd.Tables[0].Rows[i].ItemArray[5].ToString().Sanatize(); string LName = DsAdd.Tables[0].Rows[i].ItemArray[12].ToString().Sanatize(); string cat = DsAdd.Tables[0].Rows[i].ItemArray[13].ToString().Sanatize(); string lable = DsAdd.Tables[0].Rows[i].ItemArray[15].ToString().Sanatize(); int _cat = 0; if (cat == "Home") { _cat = 0; } if (cat == "Office") { _cat = 1; } if (cat == "Others") { _cat = 2; } string instr = aid + "^" + Name.Sanatize() + "^" + Mobie.Sanatize() + "^" + AddressLine.Sanatize() + "^" + Landmark.Sanatize() + "^" + Area.Sanatize() + "^" + Pincode.Replace(" ", "~").Sanatize() + "^" + Areaid.Sanatize() + "^" + LName.Sanatize() + "^" + _cat.ToString() + "^" + lable.ToString(); straddress = straddress + @"<div class='addr-body' data-aid='" + aid + @"' data-areaid='" + Areaid + @"'><h3 class='addr_h3'>" + Name + " " + Mobie + @"<a data-toggle='modal' data-target='#address' onclick='FillAdd(this);' data-id='" + instr + "' class='edit'><i class='fa fa-pencil' aria-hidden='true'></i></a></h3><p class='addr_p'>" + AddressLine + " " + Landmark + " " + Area + @"</p><input type='text' disabled='disabled' style='display:none' text=" + instr + " /></div>"; } DivPadd.InnerHtml = ""; Divdadd.InnerHtml = ""; DivPadd.InnerHtml = straddress; Divdadd.InnerHtml = straddress; } } if (Session["CLIENT_ID"] != "" && Session["CLIENT_ID"] != null && Session["CLIENT_ID"] != "0") { string clientid = Session["CLIENT_ID"].ToString(); int Outstandingamount = crmObj.GetClientOutstanding(Convert.ToInt32(clientid)); if (Outstandingamount > 0) { diverror.InnerText = "Your Pending amount is Rs " + Outstandingamount.ToString() + " Will be added in Service fee/ Cash Handling charges"; } } else { Response.Redirect("../Signin/"); } }