Exemple #1
0
 private void BtnNew_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var frmPreInvoice = new Bills.PreSaleInvoice.FrmPreSaleInvoice(Common.Enum.FormMode.New, null, Constants.StoreOperation.PreSaleInvoice);
         frmPreInvoice.Title = Localize.PreInvoiceManagment;
         frmPreInvoice.ShowDialog();
         SetDataGrid();
     }
     catch (Exception ex)
     {
         AccountingKernel.Forms.Base.BaseWindow.ShowError(ex);
     }
 }
Exemple #2
0
        private void BtnEdit_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (DataGrid.SelectedValue == null)
                {
                    throw new Exception(Localize.ex_no_record_selected);
                }

                var frmPreInvoice = new Bills.PreSaleInvoice.FrmPreSaleInvoice(Common.Enum.FormMode.Edit, (DataGrid.SelectedValue as dynamic).Id, Constants.StoreOperation.PreSaleInvoice);
                frmPreInvoice.Title = Localize.PreInvoiceManagment;
                frmPreInvoice.ShowDialog();
                SetDataGrid();
            }
            catch (Exception ex)
            {
                AccountingKernel.Forms.Base.BaseWindow.ShowError(ex);
            }
        }