private void btnBuscarSolicitante_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdSolicitante = frm.pPersonaBE.IdPersona; txtSolicitante.Text = frm.pPersonaBE.ApeNom; intIdEmpresa = frm.pPersonaBE.IdEmpresa; txtEmpresa.Text = frm.pPersonaBE.RazonSocial; intIdUnidadMinera = frm.pPersonaBE.IdUnidadMinera; txtUnidadMinera.Text = frm.pPersonaBE.DescUnidadMinera; intIdArea = frm.pPersonaBE.IdArea; txtArea.Text = frm.pPersonaBE.DescArea; txtCargo.Text = frm.pPersonaBE.Cargo; strEmailSolicitante = frm.pPersonaBE.Email; strFechaIngreso = frm.pPersonaBE.FechaIngreso.ToString().Substring(0, 10); } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscar_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdPersona = frm.pPersonaBE.IdPersona; txtResponsable.Text = frm.pPersonaBE.ApeNom; intIdEmpresaResponsable = frm.pPersonaBE.IdEmpresa; txtEmpresaResponsable.Text = frm.pPersonaBE.RazonSocial; intIdUnidadMineraResponsable = frm.pPersonaBE.IdUnidadMinera; txtUnidadMineraResponsable.Text = frm.pPersonaBE.DescUnidadMinera; intIdAreaResponsable = frm.pPersonaBE.IdArea; txtAreaResponsable.Text = frm.pPersonaBE.DescArea; txtCargo.Text = frm.pPersonaBE.Cargo; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscarSolicitante_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdSolicitante = frm.pPersonaBE.IdPersona; txtSolicitante.Text = frm.pPersonaBE.ApeNom; intIdEmpresa = frm.pPersonaBE.IdEmpresa; txtEmpresa.Text = frm.pPersonaBE.RazonSocial; txtCargo.Text = frm.pPersonaBE.Cargo; txtDni.Text = frm.pPersonaBE.Dni; deFechaNacimiento.EditValue = frm.pPersonaBE.FechaNacimiento; txtSexo.Text = frm.pPersonaBE.Sexo; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscarResponsable_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdPersona = frm.pPersonaBE.IdPersona; txtResponsable.Text = frm.pPersonaBE.ApeNom; txtNegocio.Text = frm.pPersonaBE.DescNegocio; intIdEmpresaResponsable = frm.pPersonaBE.IdEmpresa; txtEmpresaResponsable.Text = frm.pPersonaBE.RazonSocial; intIdUnidadMineraResponsable = frm.pPersonaBE.IdUnidadMinera; txtUnidadMineraResponsable.Text = frm.pPersonaBE.DescUnidadMinera; intIdAreaResponsable = frm.pPersonaBE.IdArea; txtAreaResponsable.Text = frm.pPersonaBE.DescArea; strEmailResponsable = frm.pPersonaBE.Email; BSUtils.LoaderLook(cboSector, new SectorBL().ListaTodosActivo(intIdEmpresaResponsable, intIdUnidadMineraResponsable, intIdAreaResponsable), "DescSector", "IdSector", true); txtCargo.Text = frm.pPersonaBE.Cargo; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscar_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { txtPersona.Text = frm.pPersonaBE.ApeNom; String[] strSolicitante = frm.pPersonaBE.ApeNom.Split(' '); string strPrimerNombre = ""; string strSegundoNombre = ""; string strApellidoPaterno = ""; string strApellidoMaterno = ""; int intContardor = 0; foreach (string item in strSolicitante) { intContardor++; } if (intContardor > 3) { strPrimerNombre = strSolicitante[2].ToString(); strSegundoNombre = strSolicitante[3].ToString(); strApellidoMaterno = strSolicitante[1].ToString(); strApellidoPaterno = strSolicitante[0].ToString(); } else { strPrimerNombre = strSolicitante[2].ToString(); strApellidoMaterno = strSolicitante[1].ToString(); strApellidoPaterno = strSolicitante[0].ToString(); } txtUsuario.Text = strPrimerNombre.Substring(0, 1) + strApellidoPaterno; txtPassword.Text = frm.pPersonaBE.Dni.Trim(); strEmail = frm.pPersonaBE.Email; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscarTrabajador_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdPersona = frm.pPersonaBE.IdPersona; txtReportante.Text = frm.pPersonaBE.ApeNom; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscar_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pEmployeeBE != null) { intIdEmployee = frm.pEmployeeBE.IdEmployee; txtPersona.Text = frm.pEmployeeBE.FullName; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscarRegistradoPor_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = true; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { txtPersonaRegistro.Text = frm.pPersonaBE.ApeNom; txtPersonaCargo.Text = frm.pPersonaBE.Cargo; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBuscaResponsableAdicional2_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = true; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdResponsableAdicional2 = frm.pPersonaBE.IdPersona; txtResponsableAdicional2.Text = frm.pPersonaBE.ApeNom; strMailResponsableAdicional2 = frm.pPersonaBE.Email; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBucarResponsable_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = true; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { txtResponsableEmpresa.Text = frm.pPersonaBE.ApeNom;; txtEmailEmpresa.Text = frm.pPersonaBE.Email; } deFechaSctrIni.Focus(); } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnBucarJefe_Click(object sender, EventArgs e) { try { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { intIdJefe = frm.pPersonaBE.IdPersona; txtJefe.Text = frm.pPersonaBE.ApeNom; txtCargoSolicitante.Text = frm.pPersonaBE.Cargo; strEmailJefe = frm.pPersonaBE.Email; } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void gcTxtResponsable_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = true; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { int index = gvInspeccionTrabajoDetalle.FocusedRowHandle; gvInspeccionTrabajoDetalle.SetRowCellValue(index, "IdResponsable", frm.pPersonaBE.IdPersona); gvInspeccionTrabajoDetalle.SetRowCellValue(index, "Responsable", frm.pPersonaBE.ApeNom); } } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void gcTxtCodigo_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { string strDni = ""; strDni = (sender as TextEdit).Text; PersonaBE objE_Persona = null; objE_Persona = new PersonaBL().SeleccionaNumeroDocumento(0, strDni); if (objE_Persona != null) { int index = gvCapacitacionDetalle.FocusedRowHandle; gvCapacitacionDetalle.SetRowCellValue(index, "IdPersona", objE_Persona.IdPersona); gvCapacitacionDetalle.SetRowCellValue(index, "Codigo", objE_Persona.Dni); gvCapacitacionDetalle.SetRowCellValue(index, "ApeNom", objE_Persona.ApeNom); gvCapacitacionDetalle.SetRowCellValue(index, "DescArea", objE_Persona.DescArea); gvCapacitacionDetalle.SetRowCellValue(index, "Nota", 0); int i = 0; if (mListaCapacitacionDetalleOrigen.Count > 0) { i = mListaCapacitacionDetalleOrigen.Max(ob => Convert.ToInt32(ob.Item)); } gvCapacitacionDetalle.AddNewRow(); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "IdEmpresa", Parametros.intEmpresaId); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "IdCapacitacion", 0); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "IdCapacitacionDetalle", 0); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "Item", Convert.ToInt32(i) + 1); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "IdPersona", 0); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "Codigo", ""); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "ApeNom", ""); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "DescArea", ""); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "Nota", 0); gvCapacitacionDetalle.SetRowCellValue(gvCapacitacionDetalle.FocusedRowHandle, "TipoOper", Convert.ToInt32(Operacion.Nuevo)); gcCapacitacionDetalle.Select(); gvCapacitacionDetalle.FocusedRowHandle = DevExpress.XtraGrid.GridControl.NewItemRowHandle; gvCapacitacionDetalle.FocusedColumn = gvCapacitacionDetalle.VisibleColumns[0]; gvCapacitacionDetalle.ShowEditor(); } else { XtraMessageBox.Show("Registro no encontrado. \n Por Favor Verique", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } if (e.KeyCode == Keys.F1) { frmBusPersona frm = new frmBusPersona(); frm.pFlagTodoPersonal = false; frm.pFlagMultiSelect = false; frm.ShowDialog(); if (frm.pPersonaBE != null) { int index = gvCapacitacionDetalle.FocusedRowHandle; var Buscar = mListaCapacitacionDetalleOrigen.Where(oB => oB.IdPersona == frm.pPersonaBE.IdPersona).ToList(); if (Buscar.Count > 0) { XtraMessageBox.Show("No se puede repetir el trabajador \n Por Favor Verique", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } gvCapacitacionDetalle.SetRowCellValue(index, "IdPersona", frm.pPersonaBE.IdPersona); gvCapacitacionDetalle.SetRowCellValue(index, "Codigo", frm.pPersonaBE.Dni); gvCapacitacionDetalle.SetRowCellValue(index, "ApeNom", frm.pPersonaBE.ApeNom); gvCapacitacionDetalle.SetRowCellValue(index, "DescArea", frm.pPersonaBE.DescArea); gvCapacitacionDetalle.SetRowCellValue(index, "Nota", 0); } } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }