using Swift.DAL.BL.Remit.Transaction; using Swift.web.Component.Grid; using Swift.web.Component.Grid.gridHelper; using Swift.web.Library; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Text; using System.Xml; namespace Swift.web.AgentNew.Modify { public partial class ModifyTran : System.Web.UI.Page { private const string ViewFunctionId = "40101700"; private const string ProcessFunctionId = "40101710"; private readonly StaticDataDdl sd = new StaticDataDdl(); private readonly SwiftGrid _grid = new SwiftGrid(); private readonly RemittanceLibrary rl = new RemittanceLibrary(); protected void Page_Load(object sender, EventArgs e) { string tran = GetStatic.ReadQueryString("clickFunction", ""); showTranDetail.Value = tran; if (tran == "Y") { pageWrapper.Style.Add("min-height", "auto"); pageWrapper.Style.Add("padding-bottom", "inherit"); btnBack.Visible = false; string controlNo = GetStatic.ReadQueryString("controlNo", ""); hdnControlNo.Value = controlNo; ClientScript.RegisterStartupScript(GetType(), "key", "javascript: document.getElementById('navBar').style.visibility = 'hidden';", true); } if (!IsPostBack) { Authenticate(); //fromDate.Text= DateTime.Now.ToString("yyyy-MM-dd"); } GetStatic.ResizeFrame(Page); Misc.MakeNumericTextbox(ref tranId); } private void Authenticate() { sd.CheckAuthentication(ViewFunctionId + "," + ProcessFunctionId); } protected void btnSearchDetail_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(controlNo.Text)) LoadGridView(controlNo.Text, "", "", "", ""); else if (!string.IsNullOrEmpty(tranId.Text)) LoadGridView("", tranId.Text, "", "", ""); //else //{ // //if (fromDate.Text == "") // //{ // // PrintMessage("Please enter date!"); // // return; // //} // //else // LoadGridView("", "", null, null, fromDate.Text); //} } protected void btnClick_Click(object sender, EventArgs e) { LoadByControlNo(hdnControlNo.Value, hdnStatus.Value); } private void LoadGridView(string cNo, string txnId, string searchByText, string serachBy, string date) { var obj = new TranViewDao(); var ds = obj.DisplayMatchTran(GetStatic.GetUser(), searchByText, serachBy, date, cNo, txnId); if (ds == null) { divLoadGrid.Visible = false; PrintMessage("Transaction not found!"); rl.ManageInvalidControlNoAttempt(Page, GetStatic.GetUser(), "N"); return; } if (ds.Tables[0].Rows.Count > 0) { var dt = ds.Tables[0]; int cols = dt.Columns.Count; DataRow a = dt.Rows[0]; var str = new StringBuilder("
" + dt.Columns[i].ColumnName + " | ");
}
str.Append("
---|
" + dr[i].ToString() + " | "); } str.Append("