public void Delete(int id) { CashReg cashReg = db.CashRegs.Find(id); db.CashRegs.Remove(cashReg); db.SaveChanges(); }
private static CashRegViewModel CrDto(CashReg cr) { return(new CashRegViewModel { CashRegisterId = cr.CashRegisterId, Cash = cr.Cash, Check = cr.Check, Visa = cr.Visa, MasterCard = cr.MasterCard, Amex = cr.Amex, Discover = cr.Discover, GiftCard = cr.GiftCard, Tax = cr.Tax, CcTotal = cr.Visa + cr.MasterCard + cr.Amex + cr.Discover, Total = cr.Visa + cr.MasterCard + cr.Amex + cr.Discover + cr.GiftCard + cr.Cash + cr.Check + cr.Tax }); }
public void Cash_Click() { // WelComePage.ItemPRef.Background = System.Windows.Media.Brushes.Red; //App.Current.Properties["ITemAdd"] = 1; //App.Current.Properties["Action"] = 123; //App.Current.Properties["itemName"] = null; //App.Current.Properties["barcode"] = null; //App.Current.Properties["BussLocation"] = null; //App.Current.Properties["Qunt"] = null; //App.Current.Properties["Godown"] = null; CashReg IA = new CashReg(); IA.Show(); // ModalService.NavigateTo(new ItemAdd(), delegate(bool returnValue) { }); }
private static CashReg fromCr(CashRegViewModel cashReg) { var cr = new CashReg { CashRegisterId = cashReg.CashRegisterId, Cash = cashReg.Cash, Check = cashReg.Check, Visa = cashReg.Visa, MasterCard = cashReg.MasterCard, Amex = cashReg.Amex, Discover = cashReg.Discover, GiftCard = cashReg.GiftCard, Tax = cashReg.Tax }; return(cr); }