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++) foreach (DataRow dr in DsAdd.Tables[0].Rows) { string aid = DsAdd.Tables[0].Rows[i].ItemArray[0].ToString().Sanatize(); string Name = DsAdd.Tables[0].Rows[i].ItemArray[1].ToString().Sanatize(); string LName = DsAdd.Tables[0].Rows[i].ItemArray[12].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 Landmark = DsAdd.Tables[0].Rows[i].ItemArray[5].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 Cityid = DsAdd.Tables[0].Rows[i].ItemArray[11].ToString().Sanatize(); string City = DsAdd.Tables[0].Rows[i].ItemArray[9].ToString().Sanatize(); string Pincode = DsAdd.Tables[0].Rows[i].ItemArray[6].ToString().Sanatize(); string Category = DsAdd.Tables[0].Rows[i].ItemArray[13].ToString().Sanatize(); string IsFlagFav = DsAdd.Tables[0].Rows[i].ItemArray[14].ToString().Sanatize(); string AddressLabel = DsAdd.Tables[0].Rows[i].ItemArray[15].ToString().Sanatize(); string Cat = DsAdd.Tables[0].Rows[i].ItemArray[16].ToString().Sanatize(); string instr = Name.Sanatize() + "^" + LName.Sanatize() + "^" + Mobie.Sanatize() + "^" + AddressLine.Sanatize() + "^" + Landmark.Sanatize() + "^" + Area.Sanatize() + "^" + Pincode.ToString().Sanatize() + "^" + Areaid.ToString().Sanatize() + "^" + Cat.ToString().Sanatize() + "^" + IsFlagFav.ToString().Sanatize() + "^" + AddressLabel.Sanatize() + "^" + aid; straddress = straddress + @"<div class='addr-body' data-aid='" + Areaid + @"'><h3 class='addr_h3'>" + Name + " " + LName + " " + Mobie + @"<a onclick='FillAdd(this);' data-id='" + instr + "' data-aid='" + aid + "' class='edit'><i class='fa fa-pencil' aria-hidden='true'></i></a></h3><p class='addr_p'>" + AddressLine + " " + Landmark + " " + Area + " " + Pincode + @"</p><input type='text' disabled='disabled' style='display:none' text=" + instr + " /></div>"; strproc = strproc + " <div class='__savedaddress'>"; strproc = strproc + " <div class='left'>"; strproc = strproc + " <span class='add_badge'>" + Category + "</span>"; strproc = strproc + " <h3>" + Name + " " + LName + " " + Mobie + "</h3>"; strproc = strproc + " <p>" + AddressLine + ", " + Landmark + ", " + City + ", " + Area + "-" + Pincode + "</p>"; strproc = strproc + " </div>"; strproc = strproc + " <div class='right'>"; if (IsFlagFav == "Y") { strproc = strproc + " <i class='fa fa-star fav_star' data-aid='" + aid + "' onclick='select(this)'></i>"; } else { strproc = strproc + " <i class='fa fa-star star' data-aid='" + aid + "' onclick='select(this)'></i>"; } strproc = strproc + " <img src='../img/edit.png' alt='' data-target='#address' class='_edit' data-id='" + instr + "' data-aid='" + aid + "' onclick='FillAdd(this)' id='edit'></img>"; strproc = strproc + " <img src='../img/close.png' alt='' data-aid='" + aid + "' onclick='opclose(this)' id='close'></img>"; strproc = strproc + " </div>"; strproc = strproc + " <div style='padding-top:10px;' class='row collapse in' id='" + (i + 1) + "'>"; strproc = strproc + " </div>"; strproc = strproc + " </div>"; i++; } accordion.InnerHtml = strproc.ToString(); } } }
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/"); } }