using Swift.DAL.SwiftDAL; using Swift.web.Library; using System; using System.Data; using System.Text; namespace Swift.web.Include { public partial class ShowSlab : System.Web.UI.Page { private string master = GetStatic.ReadQueryString("master", ""); private string masterId = GetStatic.ReadQueryString("masterId", "0"); private string detail = GetStatic.ReadQueryString("detail", ""); private RemittanceLibrary sl = new RemittanceLibrary(); protected void Page_Load(object sender, EventArgs e) { if (master == "scMaster") LoadDomesticCommissionSlab(); else LoadIntlCommissionSlab(); } private void LoadIntlCommissionSlab() { var dao = new RemittanceDao(); var sql = "EXEC proc_" + detail + " @flag = 's', @" + master + "Id = " + sl.FilterString(masterId); sql += ", @user = " + sl.FilterString(GetStatic.GetUser()); sql += ", @pageNumber = '1', @pageSize='100', @sortBy='" + detail + "Id', @sortOrder='ASC'"; var ds = dao.ExecuteDataset(sql); var dt = ds.Tables[1]; if (dt == null || dt.Rows.Count == 0) { Response.Write("Not Available"); return; } var html = new StringBuilder(); html.AppendLine( ""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); foreach (DataRow dr in dt.Rows) { html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); html.AppendLine(""); } html.AppendLine("
Amount FromAmount ToPercentMinMax
" + GetStatic.FormatData(dr["fromAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["toAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["pcnt"].ToString(), "M") + "" + GetStatic.FormatData(dr["minAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["maxAmt"].ToString(), "M") + "
"); Response.Write(html.ToString()); } private void LoadDomesticCommissionSlab() { var dao = new RemittanceDao(); var sql = "EXEC proc_" + detail + " @flag = 's', @" + master + "Id = " + sl.FilterString(masterId); sql += ", @user = " + sl.FilterString(GetStatic.GetUser()); sql += ", @pageNumber = '1', @pageSize='100', @sortBy='" + detail + "Id', @sortOrder='ASC'"; var ds = dao.ExecuteDataset(sql); var dt = ds.Tables[1]; if (dt == null || dt.Rows.Count == 0) { Response.Write("Not Available"); return; } var html = new StringBuilder(); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); var i = 0; foreach (DataRow dr in dt.Rows) { html.Append(++i % 2 == 1 ? "" : ""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); html.Append(""); } html.Append("
AmountService ChargeSending Agent Comm.Sending Sup Agent Comm.Paying Agent Comm.Paying Sup Agent Comm.Bank Comm.
FromToPercentMin AmtMax AmtPercentMin AmtMax AmtPercentMin AmtMax AmtPercentMin AmtMax AmtPercentMin AmtMax AmtPercentMin AmtMax Amt
" + GetStatic.FormatData(dr["fromAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["toAmt"].ToString(), "M") + "" + dr["serviceChargePcnt"] + "" + GetStatic.FormatData(dr["serviceChargeMinAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["serviceChargeMaxAmt"].ToString(), "M") + "" + dr["sAgentCommPcnt"] + "" + GetStatic.FormatData(dr["sAgentCommMinAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["sAgentCommMaxAmt"].ToString(), "M") + "" + dr["ssAgentCommPcnt"] + "" + GetStatic.FormatData(dr["ssAgentCommMinAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["ssAgentCommMaxAmt"].ToString(), "M") + "" + dr["pAgentCommPcnt"] + "" + GetStatic.FormatData(dr["pAgentCommMinAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["pAgentCommMaxAmt"].ToString(), "M") + "" + dr["psAgentCommPcnt"] + "" + GetStatic.FormatData(dr["psAgentCommMinAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["psAgentCommMaxAmt"].ToString(), "M") + "" + dr["bankCommPcnt"] + "" + GetStatic.FormatData(dr["bankCommMinAmt"].ToString(), "M") + "" + GetStatic.FormatData(dr["bankCommMaxAmt"].ToString(), "M") + "
"); Response.Write(html.ToString()); } } }