private void Cargar_Listados() { DataTable Dt = new DataTable(); Datos_Cargo Funcion_C = new Datos_Cargo(); Funcion_C.Mostrar_Cargo(ref Dt); this.cbx_Cargo.DataSource = Dt; this.cbx_Cargo.DisplayMember = "Cargo"; DataTable Dt2 = new DataTable(); Datos_CC Funcion_CC = new Datos_CC(); Funcion_CC.Mostrar_CC(ref Dt2); this.cbx_CC.DataSource = Dt2; this.cbx_CC.DisplayMember = "Centro_de_Costo"; DataTable Dt3 = new DataTable(); Datos_Super Funcion_S = new Datos_Super(); Funcion_S.Mostrar_Supervisor(ref Dt3); this.cbx_Supervisor.DataSource = Dt3; this.cbx_Supervisor.DisplayMember = "Nombre_Completo"; }
private void Insertar_Supervisor() { if (string.IsNullOrEmpty(this.txt_Nombre.Text) == false) { if (string.IsNullOrEmpty(this.txt_Apellido.Text) == false) { Logica_Super Parametros = new Logica_Super(); Datos_Super Funcion = new Datos_Super(); Parametros.Nombre = this.txt_Nombre.Text; Parametros.Apellido = this.txt_Apellido.Text; if (Funcion.Insertar_Supervisor(Parametros) == true) { this.btn_Volver_Click(this, null); } } else { MessageBox.Show("Agregar un Apellido", "Falta el Apellido...", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Agregar un Nombre", "Falta el Nombre...", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void Mostrar_Supervisor() { DataTable Dt = new DataTable(); Datos_Super Funcion = new Datos_Super(); Funcion.Mostrar_Supervisor(ref Dt); this.DGV_Supervisor.DataSource = Dt; Logica_DataTable.MultiLinea(ref DGV_Supervisor); }
private void Buscar_Supervisor() { DataTable Dt = new DataTable(); Datos_Super Funcion = new Datos_Super(); Funcion.Buscar_Supervisor(ref Dt, this.txt_Nombre.Text, this.txt_Apellido.Text); this.DGV_Supervisor.DataSource = Dt; Logica_DataTable.MultiLinea(ref this.DGV_Supervisor); }