public AddInvoice(MainWindow owner)
 {
     invoice    = new ExtendedInvoice();
     this.owner = owner;
     InitializeComponent();
     SetComboboxes();
     SetDataGrid();
 }
        public EditInvoice(ExtendedInvoice invoice, MainWindow owner)
        {
            InitializeComponent();
            this.invoice = invoice;
            this.owner   = owner;

            SetDefaultTextBoxValues();
            SetComboboxes();
        }
Exemple #3
0
 public ShowInvoice(ExtendedInvoice invoice, MainWindow owner)
 {
     this.invoiceInstance = invoice;
     this.owner           = owner;
     InitializeComponent();
     SetInvoiceInfo();
     SetSubjects();
     SetItems();
 }
        internal void UpdateItemList(ExtendedInvoice invoice, ExtendedItem item)
        {
            int itemId = GetItemId(item);
            int freeID = GetFreeItemInInvoiceId();

            SQLtoLINQ.Item_in_invoice iii = new SQLtoLINQ.Item_in_invoice();
            iii.Id         = freeID;
            iii.Invoice_Id = invoice.Id;
            iii.Item_Id    = itemId;
            iii.Amount     = item.amount;
            dbContext.Item_in_invoice.InsertOnSubmit(iii);
            dbContext.SubmitChanges();
        }
Exemple #5
0
        public ShowInvoice(String invoice, MainWindow owner)
        {
            this.owner = owner;

            InitializeComponent();

            DBGetInvoice db = new DBGetInvoice();

            invoiceInstance = db.GetInvoice(Int16.Parse(GetInvoiceId(invoice)));

            SetInvoiceInfo();
            SetSubjects();
            SetItems();
        }