示例#1
0
        public IActionResult IngresarPlanta(Plantas m)
        {
            if (ModelState.IsValid)
            {
                _context.Add(m);
                _context.SaveChanges();
                return(RedirectToAction("index"));
            }

            return(View(m));
        }
示例#2
0
        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;
        }
示例#3
0
        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));
            }
        }
示例#4
0
        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));
            }
        }
示例#5
0
 public IActionResult PanelUsuario(Plantas pa)
 {
     return(View(pa));
 }
 public FormLineas(Plantas planta)
 {
     InitializeComponent();
     elementHost1.Child = new UserControls.Lineas(planta);
 }