Exemplo n.º 1
0
    protected void btnRemPay_Click(object sender, EventArgs e)
    {
        String clientName = lbPayNames.SelectedValue;

        GlobalClientList.removePayable(clientName);

        populateListBox(lbPayNames, GlobalClientList.payList);
    }
Exemplo n.º 2
0
    protected void btnRemRec_Click(object sender, EventArgs e)
    {
        String clientName = lbRecNames.SelectedValue;

        GlobalClientList.removeReceivable(clientName);

        populateListBox(lbRecNames, GlobalClientList.recList);
    }
Exemplo n.º 3
0
    protected void btnAddRec_Click(object sender, EventArgs e)
    {
        Client receivable = new Client(txtRecName.Text,
                                       Convert.ToDouble(txtRecAmount.Text),
                                       txtRecComment.Text,
                                       cbxRecPaid.Checked);

        GlobalClientList.addReceivable(receivable);
        populateListBox(lbRecNames, GlobalClientList.recList);

        txtRecName.Text    = "";
        txtRecAmount.Text  = "";
        txtRecComment.Text = "";
        cbxRecPaid.Checked = false;
    }
Exemplo n.º 4
0
    protected void btnAddPay_Click(object sender, EventArgs e)
    {
        Client payable = new Client(txtPayName.Text,
                                    Convert.ToDouble(txtPayAmount.Text),
                                    txtPayComment.Text,
                                    cbxPayPaid.Checked);

        GlobalClientList.addPayable(payable);
        populateListBox(lbPayNames, GlobalClientList.payList);

        txtPayName.Text    = "";
        txtPayAmount.Text  = "";
        txtPayComment.Text = "";
        cbxPayPaid.Checked = false;
    }
Exemplo n.º 5
0
    protected void InsertButton_Click(object sender, EventArgs e)
    {
        //make TReport entry
        insertTReport();

        //make agginvclient entry for each receivable
        HashSet <Client> recList = GlobalClientList.recList;

        foreach (Client client in recList)
        {
            addClientToInvoice(client, true);
        }

        //make agginvclient entry for each payable
        HashSet <Client> payList = GlobalClientList.payList;

        foreach (Client client in payList)
        {
            addClientToInvoice(client, false);
        }



        GlobalClientList.clear();
        populateListBox(lbRecNames, GlobalClientList.recList);
        populateListBox(lbPayNames, GlobalClientList.payList);

        DoneMsg.Text = "Entry " + txtInvoice.Text + " has been added";

        txtAP.Text        = "";
        txtAR.Text        = "";
        txtBSP.Text       = "";
        txtCC.Text        = "";
        txtCommAgent.Text = "";
        txtCommAir.Text   = "";
        txtGSTC.Text      = "";
        txtGSTP.Text      = "";
        txtNetRemit.Text  = "";
        txtInvoice.Text   = "";
        txtTransDate.Text = "";
        txtRebate.Text    = "";
    }