Example #1
0
 /// <summary>
 /// ��ѯȫ������
 /// </summary>
 public static DataSet SelectAll()
 {
     DataBase db = new DataBase();
     DataBaseVisitor visitor = new D_StatProjectDal();
     DataSet ds = new DataSet();
     try
     {
         ds = db.ReturnDataSet(visitor, "Select", "D_StatProject");
     }
     catch (Exception ex)
     { throw new Exception(ex.Message); }
     finally
     {
         db.Dispose();
     }
     return ds;
 }
Example #2
0
 /// <summary>
 /// ���ݷ�����ѯ��Ҫ��ʾ�������ֶ���Ϣ
 /// </summary>
 public static DataSet SelectByCode(string ProCode)
 {
     DataBase db = new DataBase();
     DataBaseVisitor visitor = new D_StatProjectDal();
     DataSet ds = new DataSet();
     SqlParameter[] prams ={
        db.MakeInParam("@ProCode", SqlDbType.VarChar,50, ProCode),
      };
     try
     {
         ds = db.ReturnDataSet(visitor, prams, "SelectByCode");
     }
     catch (Exception ex)
     { throw new Exception(ex.Message); }
     finally
     {
         db.Dispose();
     }
     return ds;
 }