示例#1
0
        public void Elimina(SolicitudEppBE pItem)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    SolicitudEppDL        SolicitudEpp        = new SolicitudEppDL();
                    SolicitudEppDetalleDL SolicitudEppDetalle = new SolicitudEppDetalleDL();

                    List <SolicitudEppDetalleBE> lstSolicitudEppDetalle = null;
                    lstSolicitudEppDetalle = new SolicitudEppDetalleDL().ListaTodosActivo(pItem.IdSolicitudEpp);

                    foreach (SolicitudEppDetalleBE item in lstSolicitudEppDetalle)
                    {
                        SolicitudEppDetalle.Elimina(item);
                    }

                    SolicitudEpp.Elimina(pItem);

                    ts.Complete();
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#2
0
        public Int32 Inserta(SolicitudEppBE pItem, List <SolicitudEppDetalleBE> pListaSolicitudEppDetalle)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    SolicitudEppDL        SolicitudEpp        = new SolicitudEppDL();
                    SolicitudEppDetalleDL SolicitudEppDetalle = new SolicitudEppDetalleDL();

                    int IdSolicitudEpp = 0;
                    IdSolicitudEpp = SolicitudEpp.Inserta(pItem);

                    foreach (var item in pListaSolicitudEppDetalle)
                    {
                        item.IdSolicitudEpp = IdSolicitudEpp;
                        SolicitudEppDetalle.Inserta(item);
                    }

                    ts.Complete();

                    return(IdSolicitudEpp);
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#3
0
        public void Actualiza(SolicitudEppBE pItem, List <SolicitudEppDetalleBE> pListaSolicitudEppDetalle)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    SolicitudEppDL        SolicitudEpp        = new SolicitudEppDL();
                    SolicitudEppDetalleDL SolicitudEppDetalle = new SolicitudEppDetalleDL();

                    foreach (SolicitudEppDetalleBE item in pListaSolicitudEppDetalle)
                    {
                        if (item.TipoOper == Convert.ToInt32(Operacion.Nuevo)) //Nuevo
                        {
                            item.IdSolicitudEpp = pItem.IdSolicitudEpp;
                            SolicitudEppDetalle.Inserta(item);
                        }
                        else
                        {
                            SolicitudEppDetalle.Actualiza(item);
                        }
                    }

                    SolicitudEpp.Actualiza(pItem);

                    ts.Complete();
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
示例#4
0
        public Int32 Inserta(SolicitudEppBE pItem)
        {
            Int32     intIdSolicitudEpp = 0;
            Database  db        = DatabaseFactory.CreateDatabase("cnSSOMABD");
            DbCommand dbCommand = db.GetStoredProcCommand("usp_SolicitudEpp_Inserta");

            db.AddOutParameter(dbCommand, "pIdSolicitudEpp", DbType.Int32, pItem.IdSolicitudEpp);
            db.AddInParameter(dbCommand, "pIdEmpresa", DbType.Int32, pItem.IdEmpresa);
            db.AddInParameter(dbCommand, "pIdUnidadMinera", DbType.Int32, pItem.IdUnidadMinera);
            db.AddInParameter(dbCommand, "pIdArea", DbType.Int32, pItem.IdArea);
            db.AddInParameter(dbCommand, "pNumero", DbType.String, pItem.Numero);
            db.AddInParameter(dbCommand, "pIdJefe", DbType.Int32, pItem.IdJefe);
            db.AddInParameter(dbCommand, "pIdPersona", DbType.Int32, pItem.IdPersona);
            db.AddInParameter(dbCommand, "pIdEmpresaResponsable", DbType.Int32, pItem.IdEmpresaResponsable);
            db.AddInParameter(dbCommand, "pIdUnidadMineraResponsable", DbType.Int32, pItem.IdUnidadMineraResponsable);
            db.AddInParameter(dbCommand, "pIdAreaResponsable", DbType.Int32, pItem.IdAreaResponsable);
            db.AddInParameter(dbCommand, "pIdSectorResponsable", DbType.Int32, pItem.IdSectorResponsable);
            db.AddInParameter(dbCommand, "pFecha", DbType.DateTime, pItem.Fecha);
            db.AddInParameter(dbCommand, "pIdSituacion", DbType.Int32, pItem.IdSituacion);
            db.AddInParameter(dbCommand, "pFlagEstado", DbType.Boolean, pItem.FlagEstado);
            db.AddInParameter(dbCommand, "pUsuario", DbType.String, pItem.Usuario);
            db.AddInParameter(dbCommand, "pMaquina", DbType.String, pItem.Maquina);

            db.ExecuteNonQuery(dbCommand);

            intIdSolicitudEpp = (int)db.GetParameterValue(dbCommand, "pIdSolicitudEpp");

            return(intIdSolicitudEpp);
        }
示例#5
0
 public SolicitudEppBE Selecciona(int IdSolicitudEpp)
 {
     try
     {
         SolicitudEppDL SolicitudEpp = new SolicitudEppDL();
         SolicitudEppBE objEmp       = SolicitudEpp.Selecciona(IdSolicitudEpp);
         return(objEmp);
     }
     catch (Exception ex)
     { throw ex; }
 }
示例#6
0
        public void Elimina(SolicitudEppBE pItem)
        {
            Database  db        = DatabaseFactory.CreateDatabase("cnSSOMABD");
            DbCommand dbCommand = db.GetStoredProcCommand("usp_SolicitudEpp_Elimina");

            db.AddInParameter(dbCommand, "pIdSolicitudEpp", DbType.Int32, pItem.IdSolicitudEpp);
            db.AddInParameter(dbCommand, "pIdEmpresa", DbType.Int32, pItem.IdEmpresa);
            db.AddInParameter(dbCommand, "pUsuario", DbType.String, pItem.Usuario);
            db.AddInParameter(dbCommand, "pMaquina", DbType.String, pItem.Maquina);

            db.ExecuteNonQuery(dbCommand);
        }
示例#7
0
        public List <SolicitudEppBE> ListaFechaResponsable(int IdEmpresaResponsable, int IdUnidadMineraResponsable, int IdAreaResponsable, int IdResponsable, DateTime FechaDesde, DateTime FechaHasta)
        {
            Database  db        = DatabaseFactory.CreateDatabase("cnSSOMABD");
            DbCommand dbCommand = db.GetStoredProcCommand("usp_SolicitudEpp_ListaFechaResponsable");

            db.AddInParameter(dbCommand, "pIdEmpresaResponsable", DbType.Int32, IdEmpresaResponsable);
            db.AddInParameter(dbCommand, "pIdUnidadMineraResponsable", DbType.Int32, IdUnidadMineraResponsable);
            db.AddInParameter(dbCommand, "pIdAreaResponsable", DbType.Int32, IdAreaResponsable);
            db.AddInParameter(dbCommand, "pIdResponsable", DbType.Int32, IdResponsable);
            db.AddInParameter(dbCommand, "pFechaDesde", DbType.DateTime, FechaDesde);
            db.AddInParameter(dbCommand, "pFechaHasta", DbType.DateTime, FechaHasta);


            IDataReader           reader           = db.ExecuteReader(dbCommand);
            List <SolicitudEppBE> SolicitudEpplist = new List <SolicitudEppBE>();
            SolicitudEppBE        SolicitudEpp;

            while (reader.Read())
            {
                SolicitudEpp = new SolicitudEppBE();
                SolicitudEpp.IdSolicitudEpp            = Int32.Parse(reader["idSolicitudEpp"].ToString());
                SolicitudEpp.IdEmpresa                 = Int32.Parse(reader["IdEmpresa"].ToString());
                SolicitudEpp.RazonSocial               = reader["RazonSocial"].ToString();
                SolicitudEpp.IdUnidadMinera            = Int32.Parse(reader["IdUnidadMinera"].ToString());
                SolicitudEpp.DescUnidadMinera          = reader["DescUnidadMinera"].ToString();
                SolicitudEpp.IdArea                    = Int32.Parse(reader["IdArea"].ToString());
                SolicitudEpp.DescArea                  = reader["DescArea"].ToString();
                SolicitudEpp.Numero                    = reader["Numero"].ToString();
                SolicitudEpp.IdJefe                    = Int32.Parse(reader["IdJefe"].ToString());
                SolicitudEpp.Jefe                      = reader["Jefe"].ToString();
                SolicitudEpp.CargoJefe                 = reader["CargoJefe"].ToString();
                SolicitudEpp.IdPersona                 = Int32.Parse(reader["IdPersona"].ToString());
                SolicitudEpp.Responsable               = reader["Responsable"].ToString();
                SolicitudEpp.Cargo                     = reader["Cargo"].ToString();
                SolicitudEpp.DescNegocio               = reader["DescNegocio"].ToString();
                SolicitudEpp.IdEmpresaResponsable      = Int32.Parse(reader["IdEmpresaResponsable"].ToString());
                SolicitudEpp.EmpresaResponsable        = reader["EmpresaResponsable"].ToString();
                SolicitudEpp.IdUnidadMineraResponsable = Int32.Parse(reader["IdUnidadMineraResponsable"].ToString());
                SolicitudEpp.UnidadMineraResponsable   = reader["UnidadMineraResponsable"].ToString();
                SolicitudEpp.IdAreaResponsable         = Int32.Parse(reader["IdAreaResponsable"].ToString());
                SolicitudEpp.AreaResponsable           = reader["AreaResponsable"].ToString();
                SolicitudEpp.IdSectorResponsable       = Int32.Parse(reader["IdSectorResponsable"].ToString());
                SolicitudEpp.SectorResponsable         = reader["SectorResponsable"].ToString();
                SolicitudEpp.Fecha                     = DateTime.Parse(reader["Fecha"].ToString());
                SolicitudEpp.IdSituacion               = Int32.Parse(reader["IdSituacion"].ToString());
                SolicitudEpp.Situacion                 = reader["Situacion"].ToString();
                SolicitudEpp.FlagEstado                = Boolean.Parse(reader["flagestado"].ToString());
                SolicitudEpplist.Add(SolicitudEpp);
            }
            reader.Close();
            reader.Dispose();
            return(SolicitudEpplist);
        }
        private void frmRegSolicitudEppEdit_Load(object sender, EventArgs e)
        {
            deFecha.EditValue = DateTime.Now;

            gvSolicitudEppDetalle.OptionsView.ShowFooter = true;
            gvSolicitudEppDetalle.Layout += new EventHandler(gvSolicitudEppDetalle_Layout);

            if (pOperacion == Operacion.Nuevo)
            {
                this.Text = "Registro Solicitud de Epp - Nuevo ";
            }
            else if (pOperacion == Operacion.Modificar)
            {
                this.Text = "Registro Solicitud de Epp - Modificar ";
                SolicitudEppBE objE_SolicitudEpp = null;
                objE_SolicitudEpp = new SolicitudEppBL().Selecciona(IdSolicitudEpp);
                if (objE_SolicitudEpp != null)
                {
                    IdSolicitudEpp                  = objE_SolicitudEpp.IdSolicitudEpp;
                    deFecha.EditValue               = objE_SolicitudEpp.Fecha;
                    txtNumero.Text                  = objE_SolicitudEpp.Numero;
                    intIdJefe                       = objE_SolicitudEpp.IdJefe;
                    txtJefe.Text                    = objE_SolicitudEpp.Jefe;
                    txtCargoSolicitante.Text        = objE_SolicitudEpp.CargoJefe;
                    intIdEmpresa                    = objE_SolicitudEpp.IdEmpresa;
                    intIdUnidadMinera               = objE_SolicitudEpp.IdUnidadMinera;
                    intIdArea                       = objE_SolicitudEpp.IdArea;
                    intIdPersona                    = objE_SolicitudEpp.IdPersona;
                    txtResponsable.Text             = objE_SolicitudEpp.Responsable;
                    txtNegocio.Text                 = objE_SolicitudEpp.DescNegocio;
                    txtCargo.Text                   = objE_SolicitudEpp.Cargo;
                    intIdEmpresaResponsable         = objE_SolicitudEpp.IdEmpresaResponsable;
                    txtEmpresaResponsable.Text      = objE_SolicitudEpp.EmpresaResponsable;
                    intIdUnidadMineraResponsable    = objE_SolicitudEpp.IdUnidadMineraResponsable;
                    txtUnidadMineraResponsable.Text = objE_SolicitudEpp.UnidadMineraResponsable;
                    intIdAreaResponsable            = objE_SolicitudEpp.IdAreaResponsable;
                    txtAreaResponsable.Text         = objE_SolicitudEpp.AreaResponsable;

                    BSUtils.LoaderLook(cboSector, new SectorBL().ListaTodosActivo(intIdEmpresaResponsable, intIdUnidadMineraResponsable, intIdAreaResponsable), "DescSector", "IdSector", true);
                    cboSector.EditValue = objE_SolicitudEpp.IdSectorResponsable;
                }
            }

            CargaEppDetalle();
            AttachSummaryEPP();
        }
示例#9
0
        public void InicializarModificar()
        {
            if (gvSolicitudEpp.RowCount > 0)
            {
                SolicitudEppBE objSolicitudEpp = new SolicitudEppBE();
                objSolicitudEpp.IdSolicitudEpp = int.Parse(gvSolicitudEpp.GetFocusedRowCellValue("IdSolicitudEpp").ToString());

                int intIdSituacion = int.Parse(gvSolicitudEpp.GetFocusedRowCellValue("IdSituacion").ToString());
                if (intIdSituacion == Parametros.intSLCPendiente)
                {
                    frmRegSolicitudEppEdit objManSolicitudEppEdit = new frmRegSolicitudEppEdit();
                    objManSolicitudEppEdit.pOperacion        = frmRegSolicitudEppEdit.Operacion.Modificar;
                    objManSolicitudEppEdit.IdSolicitudEpp    = objSolicitudEpp.IdSolicitudEpp;
                    objManSolicitudEppEdit.StartPosition     = FormStartPosition.CenterParent;
                    objManSolicitudEppEdit.btnGrabar.Enabled = true;
                    objManSolicitudEppEdit.ShowDialog();
                }

                if (intIdSituacion == Parametros.intSLCAtendido || intIdSituacion == Parametros.intSLCAnulado)
                {
                    frmRegSolicitudEppEdit objManSolicitudEppEdit = new frmRegSolicitudEppEdit();
                    objManSolicitudEppEdit.pOperacion        = frmRegSolicitudEppEdit.Operacion.Modificar;
                    objManSolicitudEppEdit.IdSolicitudEpp    = objSolicitudEpp.IdSolicitudEpp;
                    objManSolicitudEppEdit.StartPosition     = FormStartPosition.CenterParent;
                    objManSolicitudEppEdit.btnGrabar.Enabled = false;
                    objManSolicitudEppEdit.ShowDialog();
                }



                Cargar();
            }
            else
            {
                MessageBox.Show("No se pudo editar");
            }
        }
        private void txtNumeroSolicitud_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    SolicitudEppBE objE_SolicitudEpp = null;
                    objE_SolicitudEpp = new SolicitudEppBL().SeleccionaNumero(Convert.ToInt32(txtNumeroSolicitud.EditValue));
                    if (objE_SolicitudEpp != null)
                    {
                        if (objE_SolicitudEpp.IdSituacion == Parametros.intSLCPendiente)
                        {
                            intIdSolicitudEpp               = objE_SolicitudEpp.IdSolicitudEpp;
                            txtNumeroSolicitud.Text         = objE_SolicitudEpp.Numero;
                            intIdPersona                    = objE_SolicitudEpp.IdPersona;
                            txtResponsable.Text             = objE_SolicitudEpp.Responsable;
                            intIdEmpresaResponsable         = objE_SolicitudEpp.IdEmpresaResponsable;
                            txtEmpresaResponsable.Text      = objE_SolicitudEpp.EmpresaResponsable;
                            intIdUnidadMineraResponsable    = objE_SolicitudEpp.IdUnidadMineraResponsable;
                            txtUnidadMineraResponsable.Text = objE_SolicitudEpp.UnidadMineraResponsable;
                            intIdAreaResponsable            = objE_SolicitudEpp.IdAreaResponsable;
                            txtAreaResponsable.Text         = objE_SolicitudEpp.AreaResponsable;
                            intIdSectorResponsable          = objE_SolicitudEpp.IdSectorResponsable;
                            txtSectorResponsable.Text       = objE_SolicitudEpp.SectorResponsable;
                            txtCargo.Text                   = objE_SolicitudEpp.Cargo;
                            txtDescNegocio.Text             = objE_SolicitudEpp.DescNegocio;

                            PersonaBE objE_Persona = null;
                            objE_Persona = new PersonaBL().Selecciona(0, 0, 0, objE_SolicitudEpp.IdJefe);

                            if (objE_Persona != null)
                            {
                                strEmail = objE_Persona.Email;
                            }

                            //LLENAMOS EL DETALLE

                            List <SolicitudEppDetalleBE> lstSolicitudDetalle = null;
                            lstSolicitudDetalle = new SolicitudEppDetalleBL().ListaTodosActivo(intIdSolicitudEpp);

                            mListaEppDetalleOrigen = new List <CEppDetalle>();


                            foreach (SolicitudEppDetalleBE item in lstSolicitudDetalle)
                            {
                                CEppDetalle objE_EppDetalle = new CEppDetalle();
                                objE_EppDetalle.IdEmpresa    = intIdEmpresa;
                                objE_EppDetalle.IdEpp        = 0;
                                objE_EppDetalle.IdEppDetalle = 0;
                                objE_EppDetalle.Item         = item.Item;
                                objE_EppDetalle.IdEquipo     = item.IdEquipo;
                                objE_EppDetalle.Codigo       = item.Codigo;
                                objE_EppDetalle.DescEquipo   = item.DescEquipo;

                                //Obtenemos la fecha de vencimiento
                                AreaEquipoBE objE_AreaEquipo = null;
                                objE_AreaEquipo = new AreaEquipoBL().SeleccionaEquipo(intIdEmpresaResponsable, intIdUnidadMineraResponsable, intIdAreaResponsable, 0);
                                if (objE_AreaEquipo == null)
                                {
                                    string strMensaje = "El Equipo de Protecciòn Personal, no esta asigando:\n";
                                    strMensaje = strMensaje + "Empresa : " + objE_SolicitudEpp.EmpresaResponsable + "\n";
                                    strMensaje = strMensaje + "Sede : " + objE_SolicitudEpp.UnidadMineraResponsable + "\n";
                                    strMensaje = strMensaje + "Area : " + objE_SolicitudEpp.AreaResponsable + "\n";
                                    strMensaje = strMensaje + "EPP : " + item.DescEquipo + "\n";

                                    XtraMessageBox.Show(strMensaje, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                                    return;
                                }
                                else
                                {
                                    objE_EppDetalle.FechaVencimiento = deFecha.DateTime.AddDays(objE_AreaEquipo.Dias);
                                }


                                objE_EppDetalle.Cantidad = item.Cantidad;

                                EquipoBE objE_Equipo = null;
                                objE_Equipo = new EquipoBL().Selecciona(Parametros.intEmpresaId, item.IdEquipo);
                                if (objE_Equipo != null)
                                {
                                    objE_EppDetalle.Precio = objE_Equipo.Precio;
                                    objE_EppDetalle.Total  = item.Cantidad * objE_Equipo.Precio;
                                }


                                objE_EppDetalle.IdTipoEntrega   = Parametros.intTENuevo;
                                objE_EppDetalle.DescTipoEntrega = "NUEVO";
                                objE_EppDetalle.IdKardex        = 0;
                                objE_EppDetalle.TipoOper        = 4;
                                mListaEppDetalleOrigen.Add(objE_EppDetalle);
                            }

                            bsListado.DataSource    = mListaEppDetalleOrigen;
                            gcEppDetalle.DataSource = bsListado;
                            gcEppDetalle.RefreshDataSource();
                        }
                        else
                        {
                            XtraMessageBox.Show("La Solicitud ya fue atendida o anulada. \nPor Favor Verifique", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                if (!ValidarIngreso())
                {
                    SolicitudEppBE objSolicitudEpp    = new SolicitudEppBE();
                    SolicitudEppBL objBL_SolicitudEpp = new SolicitudEppBL();

                    StringBuilder strMensaje = new StringBuilder();



                    objSolicitudEpp.IdSolicitudEpp            = IdSolicitudEpp;
                    objSolicitudEpp.IdUnidadMinera            = Parametros.intUnidadMineraId;
                    objSolicitudEpp.IdArea                    = Parametros.intAreaId;
                    objSolicitudEpp.Numero                    = txtNumero.Text;
                    objSolicitudEpp.IdJefe                    = intIdJefe;
                    objSolicitudEpp.IdPersona                 = intIdPersona;
                    objSolicitudEpp.IdEmpresaResponsable      = intIdEmpresaResponsable;
                    objSolicitudEpp.IdUnidadMineraResponsable = intIdUnidadMineraResponsable;
                    objSolicitudEpp.IdAreaResponsable         = intIdAreaResponsable;
                    objSolicitudEpp.IdSectorResponsable       = Convert.ToInt32(cboSector.EditValue);
                    objSolicitudEpp.Fecha            = Convert.ToDateTime(deFecha.DateTime.ToShortDateString());
                    objSolicitudEpp.IdSituacion      = Parametros.intSLCPendiente;
                    objSolicitudEpp.FlagEstado       = true;
                    objSolicitudEpp.Usuario          = Parametros.strUsuarioLogin;
                    objSolicitudEpp.Maquina          = WindowsIdentity.GetCurrent().Name.ToString();
                    objSolicitudEpp.IdEmpresa        = Parametros.intEmpresaId;
                    objSolicitudEpp.Jefe             = txtJefe.Text.Trim();
                    objSolicitudEpp.Responsable      = txtResponsable.Text.Trim();
                    objSolicitudEpp.DescUnidadMinera = txtUnidadMineraResponsable.Text;
                    objSolicitudEpp.Email            = strEmailJefe;

                    //Solicitud Epp Detalle
                    List <SolicitudEppDetalleBE> lstSolicitudEppDetalle = new List <SolicitudEppDetalleBE>();

                    foreach (var item in mListaSolicitudEppDetalleOrigen)
                    {
                        SolicitudEppDetalleBE objE_SolicitudEppDetalle = new SolicitudEppDetalleBE();
                        objE_SolicitudEppDetalle.IdEmpresa             = Parametros.intEmpresaId;
                        objE_SolicitudEppDetalle.IdSolicitudEpp        = IdSolicitudEpp;
                        objE_SolicitudEppDetalle.IdSolicitudEppDetalle = item.IdSolicitudEppDetalle;
                        objE_SolicitudEppDetalle.Item       = item.Item;
                        objE_SolicitudEppDetalle.IdEquipo   = item.IdEquipo;
                        objE_SolicitudEppDetalle.Codigo     = item.Codigo;
                        objE_SolicitudEppDetalle.DescEquipo = item.DescEquipo;
                        objE_SolicitudEppDetalle.Cantidad   = item.Cantidad;
                        objE_SolicitudEppDetalle.FlagEstado = true;
                        objE_SolicitudEppDetalle.Usuario    = Parametros.strUsuarioLogin;
                        objE_SolicitudEppDetalle.Maquina    = WindowsIdentity.GetCurrent().Name.ToString();
                        objE_SolicitudEppDetalle.TipoOper   = item.TipoOper;
                        lstSolicitudEppDetalle.Add(objE_SolicitudEppDetalle);
                    }

                    if (pOperacion == Operacion.Nuevo)
                    {
                        int    intNumero = 0;
                        string strNumero = "";
                        intNumero      = objBL_SolicitudEpp.Inserta(objSolicitudEpp, lstSolicitudEppDetalle);
                        strNumero      = FuncionBase.AgregarCaracter(intNumero.ToString(), "0", 7);
                        txtNumero.Text = strNumero;

                        //ActualizaNumero
                        SolicitudEppBL objBSolicitudEpp = new SolicitudEppBL();
                        objBSolicitudEpp.ActualizaNumero(intNumero, txtNumero.Text);

                        strMensaje.Append("**************************** SOLICITUD DE EPP *********************************\n\n");
                        strMensaje.Append("Se Generó el N° de Solicitud de EPP : " + txtNumero.Text + "\n\n");
                        strMensaje.Append("Solicitante : " + objSolicitudEpp.Jefe + "\n\n");
                        strMensaje.Append("Responsable : " + objSolicitudEpp.Responsable + "\n\n");
                        strMensaje.Append("Sede : " + objSolicitudEpp.DescUnidadMinera + "\n\n");

                        foreach (var item in mListaSolicitudEppDetalleOrigen)
                        {
                            strMensaje.Append("Código : " + item.Codigo.ToString() + "\n");
                            strMensaje.Append("EPP : " + item.DescEquipo.ToString() + "\n");
                            strMensaje.Append("Cantidad : " + item.Cantidad.ToString() + "\n\n");
                        }

                        strMensaje.Append("Responsable de Entrega de EPP: Jencarlo Villanueva Bruno Anexo 3052/3113  \n\n");
                        strMensaje.Append("********************************************************************************\n\n");

                        BSUtils.EmailSend(objSolicitudEpp.Email, "Solicitud de Epp", strMensaje.ToString(), "", "", "", "");

                        XtraMessageBox.Show("Se creó la Solicitud de Epp N° : " + txtNumero.Text, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        objBL_SolicitudEpp.Actualiza(objSolicitudEpp, lstSolicitudEppDetalle);
                    }
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }