public HSSupply(int SupplierId) { lDataContext = new CommonFunction().JSDataContext(); _supplyItems = new ObservableCollection <HSSupplyItem>(); // _invoice = new HSInvoice(); }
public HSOrder(int CutomerId) { lDataContext = new CommonFunction().JSDataContext(); _orderItems = new ObservableCollection <HSOrderItem>(); _invoice = new HSInvoice(); }
public vmSecurity() { lDataContext = new CommonFunction().JSDataContext(); this.Employees = new List <Employee>(); this.Roles = new List <Role>(); foreach (DataSource.Employee l in lDataContext.Employees) { this.Employees.Add(l); } foreach (DataSource.Role l in lDataContext.Roles) { this.Roles.Add(l); } }
public HSSupply() { lDataContext = new CommonFunction().JSDataContext(); _supplyItems = new ObservableCollection <HSSupplyItem>(); _invoice = new HSInvoice(); this.saveCommand = new DelegateCommand(OnSaveCommandExecuted); this.AddNewCommand = new DelegateCommand(OnAddNewCommandExecuted); this.deleteCommand = new DelegateCommand(OnDeleteCommandExecuted); this.printCommand = new DelegateCommand(OnPrintCommandExecuted); this.previewCommand = new DelegateCommand(OnPreviewCommandExecuted); this.invoiceCommand = new DelegateCommand(OnInvoiceCommandExecuted); this.closeCommand = new DelegateCommand(OnCloseCommandExecuted); _invoice.InvoiceStatusId = 1; ButtonEnabled = false; DeleteEnabled = false; IsBusy = false; Foreground = "Blue"; }
public vmSales() { lDataContext = new CommonFunction().JSDataContext(); }
public vmSupplier() { lDataContext = new CommonFunction().JSDataContext(); }
public HSPriceHistory() { lDataContext = new CommonFunction().JSDataContext(); }
public vmInvoice() { lDataContext = new CommonFunction().JSDataContext(); }
public static ObservableCollection <JSProduct> GetProductList() { if (productSet == null) { int?defaultUnitId = 0; SunSeven.DataSource.JSDataContext lDataContext = lDataContext = new CommonFunction().JSDataContext(); productSet = new ObservableCollection <JSProduct>(); foreach (SunSeven.DataSource.Product l in lDataContext.Products) { ObservableCollection <HSProductUnit> productUnits = new ObservableCollection <HSProductUnit>(); //foreach (SunSeven.DataSource.ProductUnit ll in lDataContext.ProductUnits.Where(p => p.ProductId == l.Id).OrderBy(p => p.DisplayIndex)) //{ // productUnits.Add(new HSProductUnit // { // ProductId = ll.ProductId, // UnitId = ll.SellingUnitId, // DisplayIndex = ll.DisplayIndex, // UnitName = ll.SellingUnit.Unit // }); //} foreach (SunSeven.DataSource.ProductUnit ll in lDataContext.ProductUnits.Where(p => p.ProductId == l.Id)) { productUnits.Add(new HSProductUnit { ProductId = ll.ProductId, UnitId = ll.SellingUnitId, DisplayIndex = ll.DisplayIndex, UnitName = ll.SellingUnit.Unit }); } if (productUnits.Count <= 0) { defaultUnitId = null; } else { defaultUnitId = productUnits.OrderBy(p => p.UnitId).First().UnitId; } //HSProductUnit lSelectedUnit = productUnits.FirstOrDefault(p => p.DisplayIndex == productUnits.Min(p2 => p2.DisplayIndex)); productSet.Add(new JSProduct { Id = l.Id, Category = l.Category.Category1.Name, subCategory = l.Category.Name, barCode = l.BarCode, ProductName = l.Name, VAT = l.VatRate, Description = l.Description, productUnits = productUnits, itemDescription = "", SelectedUnitId = defaultUnitId // SelectedUnit = lSelectedUnit }); } } return(productSet); }
public HSVatRate() { lDataContext = new CommonFunction().JSDataContext(); }
public HSCategory() { lDataContext = new CommonFunction().JSDataContext(); }
public vmSellingUnit() { lDataContext = new CommonFunction().JSDataContext(); }
public HSEmployee() { lDataContext = new CommonFunction().JSDataContext(); }
public vmPeople() { lDataContext = new CommonFunction().JSDataContext(); }
public vmConfiguration(object pGrid) { myGrid = pGrid as RadGridView; lDataContext = new CommonFunction().JSDataContext(); }
public vmConfiguration() { lDataContext = new CommonFunction().JSDataContext(); }