Esempio n. 1
0
        public void cargarData()
        {
            Obj_Combustible_DAL = new cls_Combustible_DAL();

            if (txt_filtrar_combust.Text == string.Empty)
            {
                Obj_Combustible_BLL.List_Combustible(ref Obj_Combustible_DAL);
            }
            else
            {
                Obj_Combustible_DAL.sDescripcion = txt_filtrar_combust.Text;
                Obj_Combustible_BLL.Fill_Combustible(ref Obj_Combustible_DAL);
            }

            if (Obj_Combustible_DAL.sMgsError == string.Empty)
            {
                dgv_combustib.DataSource = null;

                dgv_combustib.DataSource = Obj_Combustible_DAL.dData.Tables[ConfigurationManager.AppSettings["tablacombustibles"].ToString()];
            }
            else
            {
                MessageBox.Show("Error " + Obj_Combustible_DAL.sMgsError);
                dgv_combustib.DataSource = null;
            }
        }