コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TEstado tEstado = db.TEstados.Find(id);

            db.TEstados.Remove(tEstado);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        // 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));
        }
コード例 #7
0
 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>();
 }
コード例 #8
0
ファイル: Pedido.cs プロジェクト: Sebastianvgn/ProyectoLP2
 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>();
 }
コード例 #9
0
 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);
 }
コード例 #10
0
 public Transferencia(long id_pedido, TEstado estado)
 {
     Id_pedido = id_pedido;
     Estado    = estado;
 }