public void deposito(tipoCaixa c, double v, categoria cc) { Caixa C = new Caixa(); using (NerdEntities N = new NerdEntities()) { C.Cod_Caixa = (int)c; C.Cod_Categ = (int)cc; C.valor = (decimal)v; N.Caixa.AddObject(C); N.SaveChanges(); } }
public void deposito(tipoCaixa c, Dictionary<categoria, double> cc) { Caixa C = new Caixa(); using (NerdEntities N = new NerdEntities()) foreach (KeyValuePair<categoria, double> pair in cc) { C.Cod_Caixa = (int)c; C.Cod_Categ = (decimal)pair.Key; C.valor = (decimal)pair.Value; N.Caixa.AddObject(C); N.SaveChanges(); } }
public void incluiProduto() { using (NerdEntities N = new NerdEntities()) { produto p = new produto(); p.nome = this.nome; p.quantidade = this.qtd; N.produto.AddObject(p); N.SaveChanges(); } }
public void saque(tipoCaixa c, Dictionary<categoria, double> cc) { Caixa C = new Caixa(); using (NerdEntities N = new NerdEntities()) foreach (KeyValuePair<categoria, double> pair in cc) { C.Cod_Caixa = (int)c; _categoria = pair.Key; _valor = -(double)pair.Value; N.Caixa.AddObject(C); N.SaveChanges(); } }