private void registrarPagoToolStripMenuItem_Click(object sender, EventArgs e) { try { String ID = dataGridView1.CurrentRow.Cells[0].Value.ToString(); TallerAsistente asisT = control.obtenerAsistenteTaller(ID); FormPago fp = new FormPago(asisT.restante, "Pago de Taller"); fp.ShowDialog(); Pago pago = fp.getPagos(); fp.Dispose(); if (control.registrarPagoAsistenciaTaller(pago, asisT.ID.ToString())) { MessageBox.Show("Pago registrado exitosamente"); DocumentosWord word = new DocumentosWord(pago); btnActualizar_Click(null, null); } else { throw new Exception("Error al registrar pago"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public async Task <IActionResult> Edit(int id, [Bind("Id_Pago,pago_Name,Moneda_Id")] FormPago formPago) { if (id != formPago.Id_Pago) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(formPago); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FormPagoExists(formPago.Id_Pago)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Moneda_Id"] = new SelectList(_context.Moneda, "Moneda_Id", "Name_moneda", formPago.Moneda_Id); return(View(formPago)); }
public ActionResult DeleteConfirmed(int id) { FormPago formPago = db.FormPago.Find(id); db.FormPago.Remove(formPago); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id_Pago,pago_Name,Moneda_Id")] FormPago formPago) { if (ModelState.IsValid) { db.Entry(formPago).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Moneda_Id = new SelectList(db.Moneda, "Moneda_Id", "Name_moneda", formPago.Moneda_Id); return(View(formPago)); }
public async Task <IActionResult> Create([Bind("Id_Pago,pago_Name,Moneda_Id")] FormPago formPago) { if (ModelState.IsValid) { _context.Add(formPago); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["Moneda_Id"] = new SelectList(_context.Moneda, "Moneda_Id", "Name_moneda", formPago.Moneda_Id); return(View(formPago)); }
private void FormMenu_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F1) { FormPago frmpago = new FormPago(); frmpago.Show(); } else if (e.KeyCode == Keys.Escape) { _Login.Close(); Application.Exit(); } }
// GET: FormPagoes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FormPago formPago = db.FormPago.Find(id); if (formPago == null) { return(HttpNotFound()); } return(View(formPago)); }
// GET: FormPagoes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FormPago formPago = db.FormPago.Find(id); if (formPago == null) { return(HttpNotFound()); } ViewBag.Moneda_Id = new SelectList(db.Moneda, "Moneda_Id", "Name_moneda", formPago.Moneda_Id); return(View(formPago)); }
private void realizarPagoToolStripMenuItem_Click(object sender, EventArgs e) { FormPago frmpago = new FormPago(); frmpago.Show(); }