public IActionResult IngresarPlanta(Plantas m) { if (ModelState.IsValid) { _context.Add(m); _context.SaveChanges(); return(RedirectToAction("index")); } return(View(m)); }
public Lineas(Plantas planta) { InitializeComponent(); this.planta = planta; //BG CARGA INICIAL bgLoad.DoWork += BgLoad_DoWork; bgLoad.RunWorkerCompleted += BgLoad_RunWorkerCompleted; //BG EDITAR LINEA bgLine.DoWork += BgLine_DoWork; bgLine.RunWorkerCompleted += BgLine_RunWorkerCompleted; //TIMER DE HORA t.Elapsed += T_Elapsed; }
public async Task <IHttpActionResult> Edit(Plantas planta) { try { db.Entry(planta).State = EntityState.Modified; await db.SaveChangesAsync(); AddLog("", planta.PlantaID, planta); return(Ok(true)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public async Task <IHttpActionResult> Create(Plantas planta) { try { db.Plantas.Add(planta); await db.SaveChangesAsync(); AddLog("", planta.PlantaID, planta); return(Ok(true)); } catch (Exception ex) { return(InternalServerError(ex)); } }
public IActionResult PanelUsuario(Plantas pa) { return(View(pa)); }
public FormLineas(Plantas planta) { InitializeComponent(); elementHost1.Child = new UserControls.Lineas(planta); }