using Swift.DAL.BL.AgentPanel.Send; using Swift.web.Library; using System; using System.Text; namespace Swift.web.Remit.CustomerSOA.TxnHistroy { public partial class SenderAdvanceSearch : System.Web.UI.Page { private readonly StaticDataDdl _sdd = new StaticDataDdl(); private readonly SwiftLibrary sl = new SwiftLibrary(); protected void Page_Load(object sender, EventArgs e) { Authenticate(); searchValue.Focus(); } private void Authenticate() { //sl.CheckAuthentication(ViewFunctionId); sl.CheckSession(); } private void PopulateDdl() { _sdd.SetDDL(ref searchType, "EXEC proc_dropDownLists @flag = 'custSearchType'", "detailTitle", "detailDesc", "", "Select"); } #region method private void LoadGrid() { rpt_grid.InnerHtml = ""; SendTranIRHDao dao = new SendTranIRHDao(); var dt = dao.LoadCustomerData(searchType.Text, searchValue.Text, "advS", GetStatic.GetCountryId(), GetStatic.GetSettlingAgent()); if (dt == null || dt.Rows.Count == 0) { ManageMessage("1", "Record not found for respected Search."); return; } if (dt.Rows[0]["errorCode"].ToString() == "1") { ManageMessage(dt.Rows[0]["errorCode"].ToString(), dt.Rows[0]["msg"].ToString()); return; } int cnt = 0; StringBuilder sb = new StringBuilder("
"); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); //sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); for (int i = 0; i < dt.Rows.Count; i++) { ++cnt; sb.AppendLine(""); //for (int j = 0; j < dt.Columns.Count; j++) //{ sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); //sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); //} sb.AppendLine(""); } sb.AppendLine("
Customer IDSender NameReceiver NameCountryAddressMobile NoID TypeID NumberValid Date
" + dt.Rows[i]["customerId"] + "" + dt.Rows[i]["senderName"] + "" + dt.Rows[i]["receiverName"] + "" + dt.Rows[i]["countryName"] + "" + dt.Rows[i]["address"] + "" + dt.Rows[i]["mobile"] + "" + dt.Rows[i]["idType"] + "" + dt.Rows[i]["idNumber"] + "" + dt.Rows[i]["validDate"] + "
"); rpt_grid.InnerHtml = sb.ToString(); } private void ManageMessage(string res, string msg) { GetStatic.CallBackJs1(Page, "Call Back", "alert('" + msg + "');"); } #endregion method protected void BtnSave2_Click(object sender, EventArgs e) { if (searchValue.Text != "") LoadGrid(); } protected void btnOk_Click(object sender, EventArgs e) { string id = Request.Form["rdoId"]; GetStatic.CallBackJs1(Page, "Call Back", "CallBack('" + id + "');"); //ManageMessage(id, ""); } } }