public DataSet GetAll(string empresaid, tb_sys_status BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbSysStatus_SEARCH", cnx))
         {
             DataSet ds = new DataSet();
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@concepto", SqlDbType.VarChar, 50).Value = BE.concepto;
                 cmd.Parameters.Add("@status", SqlDbType.Char, 1).Value = BE.status;
                 cmd.Parameters.Add("@statusname", SqlDbType.VarChar, 50).Value = BE.statusname;
             }
             try
             {
                 cnx.Open();
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                 {
                     da.Fill(ds);
                 }
                 return ds;
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public bool Delete(string empresaid, tb_sys_status BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbSysStatus_DELETE", cnx))
         {
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@concepto", SqlDbType.VarChar, 50).Value = BE.concepto;
                 cmd.Parameters.Add("@status", SqlDbType.Char, 1).Value = BE.status;
                 cmd.Parameters.Add("@statusname", SqlDbType.VarChar, 50).Value = BE.statusname;
             }
             try
             {
                 cnx.Open();
                 if (cmd.ExecuteNonQuery() > 0)
                 {
                     return true;
                 }
                 else
                 {
                     return false;
                 }
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public bool Update(string empresaid, tb_sys_status BE)
 {
     return tablaDA.Update(empresaid, BE);
 }
 public bool Insert(string empresaid, tb_sys_status BE)
 {
     return tablaDA.Insert(empresaid, BE);
 }
 public DataSet GetAll(string empresaid, tb_sys_status BE)
 {
     return tablaDA.GetAll(empresaid, BE);
 }
 public bool Delete(string empresaid, tb_sys_status BE)
 {
     return tablaDA.Delete(empresaid, BE);
 }
        private void CargarCombo_Estado()
        {
            var BE = new tb_sys_status();
            var BL = new sys_statusBL();
            var dt = new DataTable();
            BE.concepto = "SISTEMAS";
            dt = BL.GetAll(EmpresaID, BE).Tables[0];

            if (dt.Rows.Count > 0)
            {
                cbo_estado.DataSource = dt;
                cbo_estado.DisplayMember = "statusname";
                cbo_estado.ValueMember = "status";
            }
        }