Esempio n. 1
0
 private void lblCheckCredit(object sender, RoutedEventArgs e)
 {
     if (sales_invoiceViewSource != null)
     {
         sales_invoice     sales_invoice = sales_invoiceViewSource.View.CurrentItem as sales_invoice;
         Class.CreditLimit Limit         = new Class.CreditLimit();
         Limit.Check_CreditAvailability(sales_invoice);
     }
 }
Esempio n. 2
0
        private void btnApprove_Click(object sender)
        {
            Settings SalesSettings = new Settings();

            Class.CreditLimit Limit = new Class.CreditLimit();
            foreach (sales_invoice sales_invoice in SalesInvoiceDB.sales_invoice.Local.Where(x => x.IsSelected))
            {
                Limit.Check_CreditAvailability(sales_invoice);
            }

            if (SalesInvoiceDB.Approve(SalesSettings.DiscountStock))
            {
                filter_sales();
                cbxDocument.ItemsSource   = entity.Brillo.Logic.Range.List_Range(SalesInvoiceDB, entity.App.Names.SalesInvoice, CurrentSession.Id_Branch, CurrentSession.Id_Terminal);
                cbxDocument.SelectedIndex = 0;
            }
            else
            {
                toolBar.msgWarning("Please check Customer's Credit");
            }
        }