using Swift.DAL.VoucherReport; using Swift.web.Library; using System; using System.Data; using System.Text; namespace Swift.web.BillVoucher.VoucherEntry { public partial class List : System.Web.UI.Page { private const string ViewFunctionId = "20150000,20150010,20150020,20150030"; private const string DateFunctionId = "20150040"; private readonly RemittanceLibrary _sdd = new RemittanceLibrary(); private readonly VoucherReportDAO _vrd = new VoucherReportDAO(); protected void Page_Load(object sender, EventArgs e) { Authenticate(); if (!IsPostBack) { AllowChangeDate(); Misc.MakeAmountTextBox(ref amt); transactionDate.Text = DateTime.Today.ToString("d"); transactionDate.Attributes.Add("readonly", "readonly"); //transactionDate.ReadOnly = true; PopulateDDL(); } } private void PopulateDDL() { _sdd.SetDDL(ref voucherType, "EXEC Proc_dropdown_remit @FLAG='voucherDDL'", "value", "functionName", "", ""); } private void Authenticate() { _sdd.CheckAuthentication(ViewFunctionId); } protected bool AllowChangeDate() { return _sdd.HasRight(DateFunctionId); } protected void addBtn_Click(object sender, EventArgs e) { if (GetStatic.ParseDouble(amt.Text) <= 0) { GetStatic.AlertMessage(this, "Please enter valid Amount! "); amt.Text = " "; amt.Focus(); return; } //var result = _vrd.InsertTempVoucherEntry(GetStatic.GetSessionId(),GetStatic.GetUser(),acInfo.Value,dropDownDrCr.Text,amt.Text); //if (result.ErrorCode == "1") //{ // GetStatic.AlertMessage(this, result.Msg); //} //else //{ // ShowTempVoucher(); //} } private void ShowTempVoucher() { //show data on div int sno = 0, drCount = 0, crCount = 0; double drTotal = 0, crTotal = 0; var dt = _vrd.GetTempVoucherEntryData(GetStatic.GetSessionId()); var sb = new StringBuilder(""); sb.AppendLine("
S. No | "); sb.AppendLine("AC information | "); sb.AppendLine("Type | "); sb.AppendLine("Amount | "); sb.AppendLine("Select | "); sb.AppendLine("
---|---|---|---|---|
No transaction found! |