public void Fill_Usuarios(ref cls_Usuarios_DAL Obj_Usuarios_DAL) { cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL(); cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL(); cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL(); Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL); Obj_BD_DAL.Dt_Parametros.Rows.Add("@filtro", "1", Obj_Usuarios_DAL.iID); Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["filtrarempleados"].ToString(); Obj_BD_DAL.sNombreTabla = ConfigurationManager.AppSettings["tablaempleados"].ToString(); Obj_BD_BLL.Excute_DataAdapter(ref Obj_BD_DAL); if (Obj_BD_DAL.sMsError == string.Empty) { Obj_Usuarios_DAL.dData = Obj_BD_DAL.Ds; Obj_Usuarios_DAL.sMgsError = string.Empty; } else { Obj_Usuarios_DAL.dData = null; Obj_Usuarios_DAL.sMgsError = Obj_BD_DAL.sMsError; } }
public void cargarData() { Obj_Usuario_DAL = new cls_Usuarios_DAL(); if (txt_filtra_empleados.Text == string.Empty) { Obj_Usuario_BLL.List_Usuarios(ref Obj_Usuario_DAL); } else { Obj_Usuario_DAL.iID = Convert.ToInt32(txt_filtra_empleados.Text); Obj_Usuario_BLL.Fill_Usuarios(ref Obj_Usuario_DAL); } if (Obj_Usuario_DAL.sMgsError == string.Empty) { dgv_citas.DataSource = null; dgv_citas.DataSource = Obj_Usuario_DAL.dData.Tables[ConfigurationManager.AppSettings["tablaempleados"].ToString()]; } else { MessageBox.Show("Error " + Obj_Usuario_DAL.sMgsError); dgv_citas.DataSource = null; } }
public void List_Usuarios(ref cls_Usuarios_DAL Obj_Usuarios_DAL) { cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL(); cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL(); Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["listarempleados"].ToString(); Obj_BD_DAL.sNombreTabla = ConfigurationManager.AppSettings["tablaempleados"].ToString(); Obj_BD_BLL.Excute_DataAdapter(ref Obj_BD_DAL); if (Obj_BD_DAL.sMsError == string.Empty) { Obj_Usuarios_DAL.dData = Obj_BD_DAL.Ds; Obj_Usuarios_DAL.sMgsError = string.Empty; } else { Obj_Usuarios_DAL.dData = null; Obj_Usuarios_DAL.sMgsError = Obj_BD_DAL.sMsError; } }