You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

  1. using Swift.DAL.AccountReport;
  2. using Swift.web.Library;
  3. using System;
  4. namespace Swift.web.AccountReport.TdsReport
  5. {
  6. public partial class CalculateTds : System.Web.UI.Page
  7. {
  8. private const string ViewFunctionId = "20150600";
  9. private readonly SwiftLibrary _sl = new SwiftLibrary();
  10. protected void Page_Load(object sender, EventArgs e)
  11. {
  12. _sl.CheckSession();
  13. if (!IsPostBack)
  14. {
  15. Authenticate();
  16. fromDate.Text = DateTime.Now.ToString("d");
  17. toDate.Text = DateTime.Now.ToString("d");
  18. voucherDate.Text = DateTime.Now.ToString("d");
  19. //fromDate.ReadOnly = true;
  20. //toDate.ReadOnly = true;
  21. //voucherDate.ReadOnly = true;
  22. }
  23. sqlMsg.InnerHtml = "";
  24. }
  25. private void Authenticate()
  26. {
  27. _sl.CheckAuthentication(ViewFunctionId);
  28. }
  29. protected void btnTds_Click(object sender, EventArgs e)
  30. {
  31. VoucherGeneration Dao = new VoucherGeneration();
  32. var fDate = fromDate.Text;
  33. var tDate = toDate.Text;
  34. var vDate = voucherDate.Text;
  35. var result = Dao.CalculateTdsAgent(fDate, tDate, vDate, GetStatic.GetUser());
  36. sqlMsg.Visible = true;
  37. sqlMsg.InnerHtml = result.Msg;
  38. }
  39. }
  40. }