public ActionResult DeleteConfirmed(int id) { TEstado tEstado = db.TEstados.Find(id); db.TEstados.Remove(tEstado); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TEstadoId,DscTEstado,Habilitado,UserId,Registro,Modificacion,Identificador")] TEstado tEstado) { if (ModelState.IsValid) { db.Entry(tEstado).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tEstado)); }
public ActionResult Create([Bind(Include = "TEstadoId,DscTEstado,Habilitado,UserId,Registro,Modificacion,Identificador")] TEstado tEstado) { if (ModelState.IsValid) { db.TEstados.Add(tEstado); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tEstado)); }
private static void CargarEstado(Estado estado, SqlCeConnection conn, LainsaSci ctx) { TEstado te = new TEstado() { EstadoId = estado.EstadoId, Nombre = estado.Nombre, EnApertura = estado.EnApertura, EnCierre = estado.EnCierre }; CntSciTerminal.TSave(te, conn); }
private void DescargarPantalla(bool newRecord) { CntSciTerminal.TOpen(this.conn); if (newRecord) { incidencia.TUsuario = usuario; } if (lblDOId.Text.Substring(0, 1) == "@") { string v = lblDOId.Text.Substring(1); v = v.Replace(",", ""); v = v.Replace(".", ""); incidencia.TDisp = CntSciTerminal.GetTDispositivo(int.Parse(lblDOId.Text.Substring(1)), conn); } else { incidencia.TDisp = CntSciTerminal.GetTDispositivo(lblDOId.Text, conn); } if (txtFechaApertura.Text != null) { if (newRecord) { incidencia.FechaApertura = DateTime.Now; } } // Fecha prevista de cierre if (dtFechaPrevista.Value != null) { incidencia.FechaPrevista = dtFechaPrevista.Value; } // ligamos el estado con la fecha de cierre TEstado estado = CntSciTerminal.GetTEstado(cmbEstado.Text, conn); incidencia.TEstado = estado; if (estado.EnCierre) { incidencia.FechaCierre = DateTime.Now; } // prioridades incidencia.TPrioridad = CntSciTerminal.GetTPrioridad(cmbPrioridad.Text, conn); // responsables incidencia.TResponsable = CntSciTerminal.GetTResponsable(cmbResponsable.Text, conn); incidencia.Comentarios = txtComentario.Text; incidencia.Operativo = !chkOperativo.Checked; if (dispositivo != null) { dispositivo.Operativo = incidencia.Operativo; } CntSciTerminal.TSave(newRecord, incidencia, conn); CntSciTerminal.TClose(this.conn); }
// GET: TEstado/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TEstado tEstado = db.TEstados.Find(id); if (tEstado == null) { return(HttpNotFound()); } return(View(tEstado)); }
public RegistroIngreso(long id_Ingreso, Proveedor proveedor, AlmacenPrincipal almacen, DateTime fecha, DateTime fecha_proceso, TTipoComprobante tipoComprobante, double subtotal, double igv, double monto_igv, double total, TEstado estado) { this.Id_Ingreso = id_Ingreso; this.Proveedor = proveedor; this.Almacen = almacen; this.Fecha = fecha; this.Fecha_proceso = fecha_proceso; this.TipoComprobante = tipoComprobante; this.Subtotal = subtotal; this.Igv = igv; this.Monto_igv = monto_igv; this.Total = total; this.Estado = estado; this.detalles = new List <DetalleRegistroIngreso>(); }
public Pedido(long id_pedido, DateTime fecha_produccion, DateTime fecha_entrega, string hora_entrega, Usuario responsable, TEstado estado, TTipoPedido tipo_pedido, AlmacenVirtual almacen, Area area, double monto, double monto_igv, double total) { this.Id_pedido = id_pedido; this.Fecha_produccion = fecha_produccion; this.Fecha_entrega = fecha_entrega; this.Hora_entrega = hora_entrega; this.Responsable = responsable; this.Estado = estado; this.Tipo_pedido = tipo_pedido; this.Almacen = almacen; this.Area = area; this.Monto = monto; this.Monto_igv = monto_igv; this.Total = total; this.detalles = new List <DetallePedido>(); }
private void CargarEstados(TEstado estado) { cmbEstado.Items.Clear(); // cargamos el desplegable. CntSciTerminal.TOpen(this.conn); foreach (TEstado e in CntSciTerminal.GetTEstados(conn)) { cmbEstado.Items.Add(e.Nombre); } if (estado != null) { cmbEstado.Text = estado.Nombre; } else { cmbEstado.Items.Add(""); cmbEstado.Text = ""; } CntSciTerminal.TClose(this.conn); }
public Transferencia(long id_pedido, TEstado estado) { Id_pedido = id_pedido; Estado = estado; }