Esempio n. 1
0
        public void setCab(prd_GrupoTrabajo_Info info)
        {
            try
            {
                InfoCabeceraGT_Nueva = info;
                txt_numGrupo.Text    = info.IdGrupoTrabajo.ToString().Trim();
                txt_nomGrupo.Text    = info.Descripcion.Trim();

                //cargaCmbE_ModeloProduccion(info.CodObra);
                //cargaCmbE_OrdenTaller(info.CodObra);
                //cmb_ordenTaller.EditValue = info.IdOrdenTaller;
                //ultraCmbELiderGrupo.EditValue = info.IdLider;
                //UCSuc.cmb_sucursal.EditValue = info.IdSucursal;
                //cmbEtapas.EditValue = info.IdEtapa;
                //cmbModeloProductivo.EditValue = info.IdProcesoProductivo;
                if (info.Estado == "I")
                {
                    lblAnulado.Visible = true;
                    chkEstado.Checked  = false;
                }
                else
                {
                    chkEstado.Checked = true;
                }


                // setDet(info.CodObra, info.IdGrupoTrabajo);
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 2
0
        public bool ModificarDB(prd_GrupoTrabajo_Info Info)
        {
            try
            {
                using (EntitiesProduccion_Cidersus context = new EntitiesProduccion_Cidersus())
                {
                    var address = new prd_GruposTrabajo();

                    address.IdEmpresa      = Info.IdEmpresa;
                    address.IdSucursal     = Info.IdSucursal;
                    address.IdGrupoTrabajo = getId(Info.IdEmpresa, Info.IdSucursal);
                    address.Descripcion    = Info.Descripcion;
                    address.AreaProduccion = Info.AreaProduccion;
                    address.Fecha          = Info.Fecha;
                    address.Estado         = Info.Estado;
                    address.Usuario        = Info.Usuario;
                    context.prd_GruposTrabajo.Add(address);
                    context.SaveChanges();
                    return(true);
                }
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString() + " " + ex.Message;
                throw new Exception(ex.ToString());
            }
        }
 private void gridViewGT_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
 {
     try
     {
         Info = (prd_GrupoTrabajo_Info)gridViewGT.GetFocusedRow();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 4
0
 public void Set(prd_GrupoTrabajo_Info info)
 {
     try
     {
         CmbSucursal.set_Idsucursal(info.IdSucursal);
         txtareaProduccion.Text = info.AreaProduccion;
         TextNombreGrupo.Text   = info.Descripcion;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 5
0
 public Boolean ModificarDB(prd_GrupoTrabajo_Info info)
 {
     try
     {
         return(data.ModificarDB(info));
     }
     catch (Exception ex)
     {
         oLog.Log_Error(ex.ToString());
         mensaje = "Error al Mmodificar .." + ex.Message;
         return(false);
     }
 }
Esempio n. 6
0
        public List <prd_GrupoTrabajo_Info> ObtenerGrupoTrabajoCab(int idempresa)
        {
            try
            {
                EntitiesProduccion_Cidersus  OEProduccion = new EntitiesProduccion_Cidersus();
                List <prd_GrupoTrabajo_Info> lM           = new List <prd_GrupoTrabajo_Info>();
                var select = from C in OEProduccion.prd_GruposTrabajo
                             where C.IdEmpresa == idempresa
                             orderby C.IdGrupoTrabajo ascending
                             select C;

                foreach (var item in select)
                {
                    prd_GrupoTrabajo_Info info = new prd_GrupoTrabajo_Info();
                    info.IdEmpresa      = idempresa;
                    info.IdSucursal     = item.IdSucursal;
                    info.IdGrupoTrabajo = item.IdGrupoTrabajo;
                    info.Descripcion    = item.Descripcion;
                    info.Fecha          = item.Fecha;
                    info.AreaProduccion = item.AreaProduccion;
                    info.Estado         = item.Estado;
                    info.Usuario        = item.Usuario;
                    lM.Add(info);
                }
                return(lM);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
                tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString() + " " + ex.Message;
                throw new Exception(ex.ToString());
            }
        }