示例#1
0
    private void LoadInvoices()
    {
        string Receiptno   = txtReceiptno.Text.Trim();
        string name        = txtname.Text.Trim();
        string PaymentType = GetSelectedType();

        if (Receiptno.Equals("") && name.Equals(""))
        {
            ShowMessage("Invoice Number or Customer Name Required", true);
            txtReceiptno.Focus();
        }
        else
        {
            DateTime fromdate = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
            DateTime todate   = bll.ReturnDate(txttoDate.Text.Trim(), 2);
            dataTable            = datapay.GetInvoice(Receiptno, name, PaymentType, fromdate, todate);
            DataGrid1.DataSource = dataTable;
            DataGrid1.DataBind();
            if (dataTable.Rows.Count > 0)
            {
                CalculateTotal(dataTable);
                DataGrid1.Visible = true;
                lblTotal.Visible  = true;
                ShowMessage(".", true);
            }
            else
            {
                lblTotal.Text     = ".";
                DataGrid1.Visible = false;
                lblTotal.Visible  = false;
                ShowMessage("No Record found", true);
            }
        }
    }
 private void LoadCredits()
 {
     try
     {
         string   custName    = txtCustName.Text;
         string   CustAccount = txtCustAccount.Text;
         DateTime fromdate    = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
         DateTime todate      = bll.ReturnDate(txttoDate.Text.Trim(), 2);
         dataTable = datafile.GetCreditsToApprove(custName, CustAccount, fromdate, todate);
         if (dataTable.Rows.Count > 0)
         {
             MultiView1.ActiveViewIndex = 0;
             DataGrid1.Visible          = true;
             DataGrid1.DataSource       = dataTable;
             DataGrid1.CurrentPageIndex = 0;
             DataGrid1.DataBind();
             //ShowMessage(".", false);
         }
         else
         {
             MultiView1.ActiveViewIndex = -1;
             ShowMessage("No Credits To Approve", true);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void LoadLogs()
 {
     user.Name            = txtSearch.Text.Trim();
     user.Role            = cboAccessLevel.SelectedValue.ToString();
     user.FromDate        = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
     user.ToDate          = bll.ReturnDate(txttoDate.Text.Trim(), 2);
     dataTable            = datafile.GetLogs(user);
     DataGrid1.DataSource = dataTable;
     DataGrid1.DataBind();
 }
    private void LoadLogs()
    {
        string   file_type = cboAccessLevel.SelectedValue.ToString();
        DateTime FromDate  = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
        DateTime ToDate    = bll.ReturnDate(txttoDate.Text.Trim(), 2);

        dataTable = datafile.GetFileProcesses(file_type, FromDate, ToDate);
        DataGrid1.CurrentPageIndex = 0;
        DataGrid1.DataSource       = dataTable;
        DataGrid1.DataBind();
    }
    private void LoadBatches()
    {
        DateTime fromDate  = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
        DateTime toDate    = bll.ReturnDate(txttoDate.Text.Trim(), 2);
        bool     confirmed = chkActive.Checked;

        dataTable = datapay.GetPaymentBatches(fromDate, toDate, confirmed);
        DataGrid1.CurrentPageIndex = 0;
        DataGrid1.DataSource       = dataTable;
        DataGrid1.DataBind();
    }
 private void LoadDeletedTransactions()
 {
     if (txtfromDate.Text.Equals(""))
     {
         DataGrid1.Visible = false;
         ShowMessage("From Date is required", true);
         txtfromDate.Focus();
     }
     else
     {
         vendorcode  = cboVendor.SelectedValue.ToString();
         vendorref   = txtpartnerRef.Text.Trim();
         Paymentcode = cboPaymentType.SelectedValue.ToString();
         Account     = txtAccount.Text.Trim();
         CustName    = txtCustName.Text.Trim();
         fromdate    = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
         //todate = bll.ReturnDate(txttoDate.Text.Trim(), 2);
         teller    = txtSearch.Text.Trim();
         utility   = cboUtility.SelectedValue.ToString();
         dataTable = datapay.GetDeletedTransactions(vendorcode, vendorref, teller, fromdate, Paymentcode, Account, CustName, utility);
         //dataTable = datapay.GetFailedTransactions(vendorcode, vendorref, teller, fromdate, Paymentcode, Account, CustName, utility);
         DataGrid1.CurrentPageIndex = 0;
         DataGrid1.DataSource       = dataTable;
         DataGrid1.DataBind();
         if (dataTable.Rows.Count > 0)
         {
             string rolecode = Session["RoleCode"].ToString();
             if (rolecode.Equals("004"))
             {
                 MultiView1.ActiveViewIndex = -1;
             }
             else
             {
                 MultiView1.ActiveViewIndex = 0;
             }
             DataGrid1.Visible = true;
             //Button1.Visible = true;
             btnDelete.Visible = true;
             ShowMessage(".", true);
         }
         else
         {
             DataGrid1.Visible = false;
             //Button1.Visible = false;
             btnDelete.Visible          = false;
             MultiView1.ActiveViewIndex = -1;
             ShowMessage("No Record found", true);
         }
     }
 }
示例#7
0
    private void LoadTransactions()
    {
        string   tranType    = DropDownList1.SelectedValue.ToString();
        string   vendorcode  = cboVendor.SelectedValue.ToString();
        string   vendorref   = txtpartnerRef.Text.Trim();
        string   Paymentcode = "0";
        string   Account     = "";
        string   CustName    = "";
        DateTime fromdate    = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
        DateTime todate      = bll.ReturnDate(txttoDate.Text.Trim(), 2);
        string   teller      = "";

        if (tranType.Equals("0"))
        {
            ShowMessage("Please Select Transaction Type", true);
        }
        else if (vendorcode.Equals("0"))
        {
            ShowMessage("Please Select Collection Partner", true);
        }
        else
        {
            if (tranType.Equals("1"))
            {
                dataTable = datapay.GetTransToBin(vendorcode, vendorref, Account, CustName, Paymentcode, teller, fromdate, todate);
            }
            else
            {
                dataTable = datapay.GetReconciledTransToBin(vendorcode, vendorref, Account, CustName, Paymentcode, teller, fromdate, todate);
            }
            DataGrid1.DataSource = dataTable;
            DataGrid1.DataBind();
            if (dataTable.Rows.Count > 0)
            {
                MultiView1.ActiveViewIndex = 0;
                CalculateTotal(dataTable);
                ShowMessage(".", true);
            }
            else
            {
                MultiView1.ActiveViewIndex = -1;
                ShowMessage("No Record found", true);
            }
        }
        chkSelect.Checked = false;
        CheckBox2.Checked = false;
    }
示例#8
0
    private void LoadTransactions()
    {
        string   vendorcode  = cboVendor.SelectedValue.ToString();
        string   vendorref   = "";
        string   option      = cboBatchType.SelectedValue.ToString();
        string   Paymentcode = "0";
        string   Account     = txtAccountno.Text.Trim();
        string   CustName    = "";
        DateTime fromdate    = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
        DateTime todate      = bll.ReturnDate(txttoDate.Text.Trim(), 2);
        string   teller      = "";

        if (option.Equals("0"))
        {
            ShowMessage("Please Select Batch Type to Create", true);
        }
        else if (vendorcode.Equals("0"))
        {
            ShowMessage("Please Select Collection Partner", true);
        }
        else
        {
            if (option.Equals("P"))
            {
                dataTable = datapay.GetTransforBatching(vendorcode, vendorref, Account, CustName, Paymentcode, teller, fromdate, todate);
            }
            else
            {
                dataTable = datapay.GetRevTransforBatching(vendorcode, vendorref, Account, CustName, Paymentcode, teller, fromdate, todate);
            }
            DataGrid1.DataSource = dataTable;
            DataGrid1.DataBind();
            if (dataTable.Rows.Count > 0)
            {
                MultiView1.ActiveViewIndex = 0;
                CalculateTotal(dataTable);
                ShowMessage(".", true);
            }
            else
            {
                MultiView1.ActiveViewIndex = -1;
                ShowMessage("No Record found", true);
            }
        }
    }
示例#9
0
    private void LoadTransactions()
    {
        string   tranType    = DropDownList1.SelectedValue.ToString();
        string   vendorcode  = "0";
        string   vendorref   = txtpartnerRef.Text.Trim();
        string   Paymentcode = "0";
        string   Accountno   = txtAccountNo.Text.Trim();
        string   CustName    = "";
        DateTime fromdate    = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
        DateTime todate      = bll.ReturnDate(txttoDate.Text.Trim(), 2);
        string   teller      = "";

        if (tranType.Equals("0"))
        {
            ShowMessage("Please Select Transaction Type", true);
        }
        else if (vendorref.Equals("") && Accountno.Equals(""))
        {
            ShowMessage("Please Enter Account / Vendor Transaction ref", true);
            txtAccountNo.Focus();
        }
        else
        {
            bool reconciled = Process.Gettrans_status(tranType);
            dataTable            = datapay.GetBinnedTransactions(vendorcode, vendorref, Accountno, CustName, Paymentcode, reconciled, teller, fromdate, todate);
            DataGrid1.DataSource = dataTable;
            DataGrid1.DataBind();
            if (dataTable.Rows.Count > 0)
            {
                MultiView1.ActiveViewIndex = 0;
                CalculateTotal(dataTable);
                ShowMessage(".", true);
            }
            else
            {
                MultiView1.ActiveViewIndex = -1;
                ShowMessage("No Record found", true);
            }
        }
        chkSelect.Checked = false;
        CheckBox2.Checked = false;
    }
示例#10
0
 private void LoadTransactions()
 {
     if (txtfromDate.Text.Equals(""))
     {
         DataGrid1.Visible = false;
         ShowMessage("From Date is required", true);
         txtfromDate.Focus();
     }
     else
     {
         string   status       = cboStatus.SelectedValue.ToString();
         string   districtcode = cboBranches.SelectedValue.ToString();
         DateTime fromdate     = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
         DateTime todate       = bll.ReturnDate(txttoDate.Text.Trim(), 2);
         if (districtcode.Trim().Equals("ALL VENDOR CODES"))
         {
             districtcode = "0";
         }
         if (status.Trim().Equals("ALL UTILITIES"))
         {
             status = "0";
         }
         dataTable = datapay.GetInterfaceErrorTable(districtcode, status, fromdate, todate);
         DataGrid1.CurrentPageIndex = 0;
         DataGrid1.DataSource       = dataTable;
         DataGrid1.DataBind();
         if (dataTable.Rows.Count > 0)
         {
             ////string rolecode = Session["RoleCode"].ToString();
             ////if (rolecode.Equals("004"))
             ////{
             //MultiView1.ActiveViewIndex = -1;
             ////}
             ////else
             ////{
             MultiView1.ActiveViewIndex = 0;
             //CalculateTotal(dataTable);
             //}
             //DataGrid1.Visible = true;
             //ShowMessage(".", true);
         }
         else
         {
             lblTotal.Text              = ".";
             DataGrid1.Visible          = false;
             lblTotal.Visible           = false;
             MultiView1.ActiveViewIndex = -1;
             ShowMessage("No Record found", true);
         }
     }
 }
示例#11
0
 private void LoadTransactions()
 {
     if (txtfromDate.Text.Equals(""))
     {
         DataGrid1.Visible = false;
         ShowMessage("From Date is required", true);
         txtfromDate.Focus();
     }
     else
     {
         string vendorcode = cboVendor.SelectedValue.ToString();
         string vendorref  = txtpartnerRef.Text.Trim();
         //string Paymentcode = cboPaymentType.SelectedValue.ToString();
         string   status   = cboStatus.SelectedValue.ToString();
         string   Account  = txtAccount.Text.Trim();
         string   CustName = txtCustName.Text.Trim();
         DateTime fromdate = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
         DateTime todate   = bll.ReturnDate(txttoDate.Text.Trim(), 2);
         //string teller = txtSearch.Text.Trim();
         string utility = cboUtility.SelectedValue.ToString();
         dataTable = datapay.GetTransactionsForPrePaidVendors(vendorcode, vendorref, Account, status, CustName, fromdate, todate, utility);
         DataGrid1.CurrentPageIndex = 0;
         DataGrid1.DataSource       = dataTable;
         DataGrid1.DataBind();
         if (dataTable.Rows.Count > 0)
         {
             string rolecode = Session["RoleCode"].ToString();
             if (rolecode.Equals("004"))
             {
                 MultiView1.ActiveViewIndex = -1;
             }
             else
             {
                 MultiView1.ActiveViewIndex = 0;
                 CalculateTotal(dataTable);
             }
             DataGrid1.Visible = true;
             ShowMessage(".", true);
         }
         else
         {
             lblTotal.Text              = ".";
             DataGrid1.Visible          = false;
             lblTotal.Visible           = false;
             MultiView1.ActiveViewIndex = -1;
             ShowMessage("No Record found", true);
         }
     }
 }
示例#12
0
 private void LoadPayments()
 {
     if (txtfromDate.Text.Equals(""))
     {
         DataGrid1.Visible = false;
         ShowMessage("From Date is required", true);
         txtfromDate.Focus();
     }
     else
     {
         string   districtcode = GetDistrictCode();
         string   Receiptno    = txtReceiptno.Text.Trim();
         string   Paymentcode  = cboPaymentType.SelectedValue.ToString();
         string   Paymode      = cboPaymode.SelectedValue.ToString();
         DateTime fromdate     = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
         DateTime todate       = bll.ReturnDate(txttoDate.Text.Trim(), 2);
         string   teller       = cboCashier.SelectedValue.ToString();
         dataTable            = datapay.GetPaymentsToReverse(districtcode, Receiptno, Paymentcode, Paymode, teller, fromdate, todate);
         DataGrid1.DataSource = dataTable;
         DataGrid1.DataBind();
         if (dataTable.Rows.Count > 0)
         {
             CalculateTotal(dataTable);
             MultiView1.ActiveViewIndex = 0;
             DataGrid1.Visible          = true;
             lblTotal.Visible           = true;
             ShowMessage(".", true);
         }
         else
         {
             lblTotal.Text              = ".";
             DataGrid1.Visible          = false;
             lblTotal.Visible           = false;
             MultiView1.ActiveViewIndex = -1;
             ShowMessage("No Record found", true);
         }
     }
 }
 private void LoadTransactions()
 {
     if (txtfromDate.Text.Equals(""))
     {
         DataGrid1.Visible = false;
         ShowMessage("From Date is required", true);
         txtfromDate.Focus();
     }
     else
     {
         string   vendorcode = cboVendor.SelectedValue.ToString();
         string   receiptNo  = txtReceiptno.Text.Trim();
         string   meterNo    = txtMeterNo.Text.Trim();
         DateTime fromdate   = bll.ReturnDate(txtfromDate.Text.Trim(), 1);
         DateTime todate     = bll.ReturnDate(txttoDate.Text.Trim(), 2);
         dataTable = datapay.GetPrepayments(vendorcode, meterNo, receiptNo, fromdate, todate);
         DataGrid1.CurrentPageIndex = 0;
         DataGrid1.DataSource       = dataTable;
         DataGrid1.DataBind();
         if (dataTable.Rows.Count > 0)
         {
             string rolecode = Session["RoleCode"].ToString();
             if (rolecode.Equals("004"))
             {
                 MultiView1.ActiveViewIndex = -1;
             }
             else
             {
                 MultiView1.ActiveViewIndex = 0;
                 CalculateTotal(dataTable);
             }
             DataGrid1.Visible = true;
             ShowMessage(".", true);
         }
         else
         {
             lblTotal.Text              = ".";
             DataGrid1.Visible          = false;
             lblTotal.Visible           = false;
             MultiView1.ActiveViewIndex = -1;
             ShowMessage("No Record found", true);
         }
     }
 }
    private void LoadCustomerContacts()
    {
        string         accountno  = txtaccountno.Text.Trim();
        string         phone      = txtPhone.Text.Trim();
        PhoneValidator phonevalid = new PhoneValidator();

        if (phonevalid.PhoneNumbersOk(phone))
        {
            phone = GetPhoneNumber(phone);
            DateTime fromDate = bll.ReturnDate(txtfromdate.Text.Trim(), 1);
            DateTime toDate   = bll.ReturnDate(txttodate.Text.Trim(), 2);
            dataTable = datapay.GetCustomercontacts(accountno, phone, fromDate, toDate);
            if (dataTable.Rows.Count > 0)
            {
                DataGrid1.CurrentPageIndex = 0;
                DataGrid1.DataSource       = dataTable;
                DataGrid1.DataBind();
                DataGrid1.Visible          = true;
                MultiView1.ActiveViewIndex = 0;
                ShowMessage(".", true);
            }
            else
            {
                DataGrid1.Visible          = false;
                MultiView1.ActiveViewIndex = -1;
                ShowMessage("No Record found", true);
            }
        }
        else
        {
            DataGrid1.Visible          = false;
            MultiView1.ActiveViewIndex = -1;
            ShowMessage("Please Enter a valid phone number", true);
            txtPhone.Focus();
        }
    }