Example #1
0
        private void btnDirectInvoice_Click(object sender, EventArgs e)
        {
            Invoice_Direct invoicedirect = new Invoice_Direct();

            invoicedirect.OnClose += Invoicedirect_onClose;
            invoicedirect.ShowDialog();
        }
Example #2
0
 private void dgvBills_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvBills.SelectedCells.Count >= 0 && dgvBills.Columns[e.ColumnIndex].Name != "Action" && e.ColumnIndex >= 0 && e.RowIndex >= 0)
     {
         if (UserTools._IsEdit)
         {
             string         invoiceno     = dgvBills.CurrentRow.Cells["invoiceno"].Value.ToString();
             string         status        = dgvBills.CurrentRow.Cells["STATUS"].Value.ToString();
             Invoice_Direct invoicedirect = new Invoice_Direct(invoiceno, status, "");
             invoicedirect.OnClose += GenerateBillingList;
             invoicedirect.ShowDialog();
         }
         else
         {
             MessageBox.Show("Edit permission denied by Admin", "Permission", MessageBoxButtons.OK, MessageBoxIcon.Stop);
             GenerateBillingList();
         }
     }
 }
Example #3
0
        private void Cmb_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox cmb = (ComboBox)sender;

            if (cmb.Text == "Create Challan")
            {
                string       orderID         = dgvBills.CurrentRow.Cells["OrderID"].Value.ToString();
                string       orderNo         = dgvBills.CurrentRow.Cells["No"].Value.ToString();
                ChallanEntry frmChallanEntry = new ChallanEntry(orderID, orderNo);
                frmChallanEntry.OnClose += GenerateOrderList;
                frmChallanEntry.ShowDialog();
            }
            else if (cmb.Text == "Advance receipt")
            {
                string         orderid = dgvBills.CurrentRow.Cells["Orderid"].Value.ToString();
                AdvanceReceipt ar      = new AdvanceReceipt(AdvanceReceipt._FromWherere.Order, orderid);
                ar.ShowDialog();
            }
            else if (cmb.Text == "Create Invoice")
            {
                string         name            = dgvBills.CurrentRow.Cells["PartyName"].Value.ToString();
                string         slno            = dgvBills.CurrentRow.Cells["slno"].Value.ToString();
                Invoice_Direct frmChallanEntry = new Invoice_Direct(slno, name);
                frmChallanEntry.OnClose += GenerateOrderList;
                frmChallanEntry.ShowDialog();
            }
            else if (cmb.Text == "Cancel Order")
            {
                string name = dgvBills.CurrentRow.Cells["PartyName"].Value.ToString();
                string slno = dgvBills.CurrentRow.Cells["slno"].Value.ToString();
                if (OrderCancel(slno))
                {
                    GenerateOrderList();
                }
            }
        }