示例#1
0
 private void tbManoObra_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F3)
     {
         Busqueda.Busqueda frmBusqueda = new Busqueda.Busqueda(45);
         frmBusqueda.ShowDialog();
         if (frmBusqueda.proceso != null)
         {
             obra            = new ManodeObra();
             presupuestos    = new Presupuestos();
             obra            = frmBusqueda.obra;
             presupuestos    = frmBusqueda.presupuestos;
             tbManoObra.Text = obra.Descripción;
         }
     }
 }
 public bool AddManodeObra(string IDManodeObra, string Descripcion)
 {
     using (PLMContext db = new PLMContext())
     {
         var ManodeObra = new ManodeObra();
         ManodeObra.IdManodeObra = IDManodeObra;
         ManodeObra.Descripción  = Descripcion;
         try
         {
             db.ManodeObra.Add(ManodeObra);
             db.SaveChanges();
             return(true);
         }
         catch (Exception ex)
         {
             Dialogs.Show(ex.Message, DialogsType.Error);
             return(false);
         }
     }
 }
示例#3
0
        public Busqueda(int _consulta)
        {
            InitializeComponent();
            Bitacora     = new Controlador.BitacoradeEventosController();
            Body         = new Controlador.BodyController();
            Category2    = new Controlador.CategoryDosController();
            Fit          = new Controlador.FitController();
            Inseam       = new Controlador.InseamController();
            Empaque      = new Controlador.EmpaqueController();
            Temporada    = new Controlador.TemporadasController();
            controlador  = new Controlador.EstilosdeProduccionController();
            cotizacion   = new Controlador.CotizacionController();
            dato         = string.Empty;
            dato2        = string.Empty;
            articulo     = new Articulos();
            articulosPT  = new ArticulosPT();
            proceso      = new Proceso();
            obra         = new ManodeObra();
            presupuestos = new Presupuestos();

            DiasF    = new Controlador.DiasFeriadoseInhabiles();
            Bom      = new Controlador.BOMController();
            consulta = _consulta;
        }
示例#4
0
        private void selDato()
        {
            if (consulta == 34)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    if (Bom.ExisteHilos(dtDatos.CurrentRow.Cells[2].Value.ToString()))
                    {
                        TareaHilo frm = new TareaHilo(dtDatos.CurrentRow.Cells[2].Value.ToString());
                        frm.ShowDialog();
                    }
                    else
                    {
                        dato1 = dtDatos.CurrentRow.Cells[2].Value.ToString();
                        Bom.RealizarTarea(dato1);
                    }
                }
                else
                {
                    dato  = "";
                    dato1 = "";
                }
            }
            if (consulta == 31)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    dato = dtDatos.CurrentRow.Cells[1].Value.ToString();
                }
                else
                {
                    dato  = "";
                    dato1 = "";
                }
            }
            else if (consulta == 18)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    dato  = dtDatos.CurrentRow.Cells[1].Value.ToString();
                    dato1 = dtDatos.CurrentRow.Cells[2].Value.ToString();
                }
                else
                {
                    dato  = "";
                    dato1 = "";
                }
            }
            else
            {
                if (dtDatos.Rows.Count > 0 && consulta != 31)
                {
                    dato = dtDatos.CurrentRow.Cells[0].Value.ToString();
                }
            }
            if (consulta == 40)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    articulo.Clave        = dtDatos.CurrentRow.Cells[0].Value.ToString();
                    articulo.Descr        = dtDatos.CurrentRow.Cells[1].Value.ToString();
                    articulo.Material     = dtDatos.CurrentRow.Cells[2].Value.ToString();
                    articulo.UnidadMedida = dtDatos.CurrentRow.Cells[3].Value.ToString();
                    articulo.Proveedor    = dtDatos.CurrentRow.Cells[4].Value.ToString();
                    articulo.Categoria    = dtDatos.CurrentRow.Cells[5].Value.ToString();
                    articulo.Color        = dtDatos.CurrentRow.Cells[6].Value.ToString();
                }
            }
            if (consulta == 41)
            {
                dato  = dtDatos.CurrentRow.Cells[0].Value.ToString();
                dato1 = dtDatos.CurrentRow.Cells[1].Value.ToString();
                dato2 = dtDatos.CurrentRow.Cells[2].Value.ToString();
            }
            if (consulta == 42)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    articulosPT.Clave     = dtDatos.CurrentRow.Cells[0].Value.ToString();
                    articulosPT.Descr     = dtDatos.CurrentRow.Cells[1].Value.ToString();
                    articulosPT.Categoria = dtDatos.CurrentRow.Cells[2].Value.ToString();
                    articulosPT.Estilo    = dtDatos.CurrentRow.Cells[3].Value.ToString();
                    articulosPT.Linea     = dtDatos.CurrentRow.Cells[4].Value.ToString();
                    articulosPT.Marca     = dtDatos.CurrentRow.Cells[5].Value.ToString();
                }
            }
            if (consulta == 43)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    articulosCot              = new ArticulosCot();
                    articulosCot.Clave        = dtDatos.CurrentRow.Cells[0].Value.ToString();
                    articulosCot.Descr        = dtDatos.CurrentRow.Cells[1].Value.ToString();
                    articulosCot.Ancho        = Convert.ToDecimal(dtDatos.CurrentRow.Cells[2].Value.ToString());
                    articulosCot.Peso         = Convert.ToDecimal(dtDatos.CurrentRow.Cells[3].Value.ToString());
                    articulosCot.Proveedor    = dtDatos.CurrentRow.Cells[4].Value.ToString();
                    articulosCot.UnidadMedida = dtDatos.CurrentRow.Cells[5].Value.ToString();
                }
            }
            if (consulta == 44)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    proceso             = new Proceso();
                    proceso.IdProceso   = dtDatos.CurrentRow.Cells[1].Value.ToString();
                    proceso.Descripción = dtDatos.CurrentRow.Cells[2].Value.ToString();
                }
            }
            if (consulta == 45)
            {
                if (dtDatos.Rows.Count > 0)
                {
                    obra              = new ManodeObra();
                    presupuestos      = new Presupuestos();
                    obra.IdManodeObra = dtDatos.CurrentRow.Cells[1].Value.ToString();
                    obra.Descripción  = dtDatos.CurrentRow.Cells[2].Value.ToString();

                    presupuestos = cotizacion.GetPresupuestos(obra.IdManodeObra);
                }
            }
            this.Close();
        }