Example #1
0
 /// <summary>
 /// ��ѯȫ��������Ŀ
 /// </summary>
 /// <returns></returns>
 public static DataSet SelectAll()
 {
     DataBase db = new DataBase();
     DataBaseVisitor visitor = new CountDal();
     DataSet ds = new DataSet();
     try
     {
         ds = db.ReturnDataSet(visitor, "Select", "V_C_StatSelect");
     }
     catch (Exception ex)
     { throw new Exception(ex.Message); }
     finally
     {
         db.Dispose();
     }
     return ds;
 }
Example #2
0
 /// <summary>
 /// ��ѯ������Ӧ�Ļ�����Ŀ
 /// </summary>
 /// <returns></returns>
 public static DataSet SelectCode(string Code)
 {
     DataBase db = new DataBase();
     DataBaseVisitor visitor = new CountDal();
     DataSet ds = new DataSet();
     SqlParameter[] prams ={
        db.MakeInParam("@Code", SqlDbType.VarChar,50, Code),
      };
     try
     {
         ds = db.ReturnDataSet(visitor, prams, "SelectCode");
     }
     catch (Exception ex)
     { throw new Exception(ex.Message); }
     finally
     {
         db.Dispose();
     }
     return ds;
 }