static protected Bill GetBill(MySqlDataReader reader) { Bill result = new Bill(); int AppID, UserID, PaymentID; result.Bill_ID = reader.GetInt16("bill_Id"); AppID = reader.GetInt32("App_ID"); Application app = ApplicationDAL.GetApplicationById(AppID); result.App = app; UserID = reader.GetInt32("User_ID"); User user = UserDAL.GetUserById(UserID); result.User = user; PaymentID = reader.GetInt32("payment_id"); result.Payment = PaymentDAL.GetPaymentById(PaymentID); result.UnitPrice = reader.GetDouble("UnitPrice"); result.DateCreate = reader.GetDateTime("DataCreate"); return(result); }
public PaymentBLL(int companyID) { this.PaymentDAL = new DAL.PaymentDAL(companyID); this.tableName = Tools.GetPaymentTableName(companyID.ToString()); }