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

                var frmSaleInvoice = new Bills.SaleInvoice.FrmSaleInvoice(Common.Enum.FormMode.Edit, (DataGrid.SelectedValue as dynamic).Id, Constants.StoreOperation.SaleInvoice);
                frmSaleInvoice.Title = Localize.SaleInvoice;
                frmSaleInvoice.ShowDialog();
                SetDataGrid();
            }
            catch (Exception ex)
            {
                AccountingKernel.Forms.Base.BaseWindow.ShowError(ex);
            }
        }
예제 #3
0
        private void MenuItem_IssueSaleInvoice(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            try
            {
                if (DataGrid.SelectedValue == null)
                {
                    throw new Exception(Localize.ex_no_record_selected);
                }

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