Exemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Cursor = Cursors.AppStarting;
            Form fx = new frmSalesInvoiceEntry();

            fx.ShowDialog();
            btnRefresh.PerformClick();
            Cursor = Cursors.Default;
        }
Exemplo n.º 2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     Cursor = Cursors.AppStarting;
     try
     {
         Form fx = new frmSalesInvoiceEntry((int)_grid.Columns["id"].Value);
         fx.ShowDialog();
         btnRefresh.PerformClick();
     }
     catch
     {
         RibbonMessageBox.Show("No data selected for editing\n",
                               Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     Cursor = Cursors.Default;
 }
Exemplo n.º 3
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvSalesInvoice.CurrentRow != null)
         {
             SetSortedColumns();
             frmSalesInvoiceEntry fSalesInvoice = new frmSalesInvoiceEntry((int)Constant.Mode.Delete, Convert.ToInt64(dgvSalesInvoice.CurrentRow.Cells["SIID"].Value));
             fSalesInvoice.ShowDialog();
             setDefaultGridRecords(sender, e);
             btnDelete.Focus();
         }
     }
     catch (Exception exc)
     {
         Utill.Common.ExceptionLogger.writeException("SalesInvoice", exc.StackTrace);
         MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
     }
 }
Exemplo n.º 4
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                frmSalesInvoiceEntry fSalesInvoice = new frmSalesInvoiceEntry((int)Constant.Mode.Insert, 0);
                fSalesInvoice.ShowDialog();
                LoadList();

                DV           = dtblSalesInvoice.DefaultView;
                DV.RowFilter = StrFilter;

                dgvSalesInvoice.DataSource = DV.ToTable();
                lblTotRec.Text             = Utill.Common.CommonMessage.TotalRecord + dgvSalesInvoice.RowCount.ToString();
            }
            catch (Exception exc)
            {
                Utill.Common.ExceptionLogger.writeException("SalesInvoice", exc.StackTrace);
                MessageBox.Show(Utill.Common.CommonMessage.ExceptionMesg, "Exception");
            }
        }