public ExibirLivro() { InitializeComponent(); livroServico = new LivroServico(new SqlConnection(connectionString)); vendaServico = new VendaServico(new SqlConnection(connectionString)); compraServico = new CompraServico(new SqlConnection(connectionString)); }
public PaginaVenda() { InitializeComponent(); vendaServico = new VendaServico(new SqlConnection(connectionString)); livroServico = new LivroServico(new SqlConnection(connectionString)); cadastroServico = new CadastroServico(new SqlConnection(connectionString)); dtCompra.Enabled = false; }
public ActionResult DeleteConfirmed(long id) { VendaServico vendaServico = db.VendaServico.Find(id); db.VendaServico.Remove(vendaServico); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,ValorTotal,Descricao,IdFuncionario,IdCliente,DataServico")] VendaServico vendaServico) { if (ModelState.IsValid) { db.Entry(vendaServico).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdCliente = new SelectList(db.Cliente, "Id", "Nome", vendaServico.IdCliente); ViewBag.IdFuncionario = new SelectList(db.Funcionario, "Id", "Nome", vendaServico.IdFuncionario); return(View(vendaServico)); }
// GET: VendaServico/Details/5 public ActionResult Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VendaServico vendaServico = db.VendaServico.Find(id); if (vendaServico == null) { return(HttpNotFound()); } return(View(vendaServico)); }
// GET: VendaServico/Edit/5 public ActionResult Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VendaServico vendaServico = db.VendaServico.Find(id); if (vendaServico == null) { return(HttpNotFound()); } ViewBag.IdCliente = new SelectList(db.Cliente, "Id", "Nome", vendaServico.IdCliente); ViewBag.IdFuncionario = new SelectList(db.Funcionario, "Id", "Nome", vendaServico.IdFuncionario); return(View(vendaServico)); }
public ExibirCadastros() { InitializeComponent(); cadastroServico = new CadastroServico(new SqlConnection(connectionString)); vendaServico = new VendaServico(new SqlConnection(connectionString)); }