Пример #1
0
 public static bool AddBill(Bill a)
 {
     string sql = "sp_InsertBill";
     SqlParameter StaffID = new SqlParameter("@StaffID", a.StaffID);
     SqlParameter CodeID = new SqlParameter("@CodeID", a.CodeID);
     SqlParameter Date = new SqlParameter("@Date", a.Date);
     return DataProvider.ExecuteNonQuery(sql, System.Data.CommandType.StoredProcedure, StaffID, CodeID, Date);
 }
Пример #2
0
 public static Bill GetbyDay(DateTime date)
 {
     string sql = "sp_GetBill";
     SqlParameter Date = new SqlParameter("@Date", date);
     SqlDataReader dr = DataProvider.ExecuteQueryWithDataReader(sql, CommandType.StoredProcedure, Date);
     if (dr.HasRows)
     {
         dr.Read();
         Bill a = new Bill();
         a.BillID = dr.GetInt32(0);
         a.CusID = dr.GetInt32(1);
         a.CodeID = dr.GetInt32(2);
         a.StaffID = dr.GetString(3);
         a.Date = dr.GetDateTime(4);
         return a;
     }
     else
         return null;
 }
Пример #3
0
 public static bool UpdateBill(Bill a)
 {
     string sql = "sp_UpdateBill";
     SqlParameter BillID = new SqlParameter("@BillID", a.BillID);
     SqlParameter CusID = new SqlParameter("@CusID", a.CusID);
     SqlParameter Total = new SqlParameter("@Total", a.Total);
     return DataProvider.ExecuteNonQuery(sql, CommandType.StoredProcedure, BillID, CusID, Total);
 }
Пример #4
0
 public static bool UpdateBill(Bill a)
 {
     return BillData.UpdateBill(a);
 }
Пример #5
0
 public static bool AddBill(Bill a)
 {
     return BillData.AddBill(a);
 }