public Account GetAccountByNo(string accountNo) { OleDbParameter oleDbParameter = new OleDbParameter(); DataTable dt = accessDB.Get(SQL_SELECT_EX, GenerateParameters(accountNo)); if (dt != null && dt.Rows.Count > 0) { return(Util <Account> .TransDataRowToAccount(dt.Rows[0])); } return(null); }
public DataTable GetAllStaff() { AccessDB accessDB = new AccessDB(); DataTable dt = accessDB.Get(SELECT_QUERY, null); return(dt); }
public DataTable TableGetAccountByNo(string accountNo) { AccessDB accessDB = new AccessDB(); DataTable dt = accessDB.Get(SQL_SELECT_EX, GenerateParameters(accountNo)); if (String.IsNullOrEmpty(accountNo)) { object obj = accessDB.GetExcuteScalar("Select Max(AccountNo) From Account"); DataRow dr = dt.NewRow(); int no = Convert.ToInt32(obj); no++; dr["AccountNo"] = no.ToString(); dt.Rows.Add(dr); } return(dt); }
public List <Staff> GetAllStaffList(string typeName) { List <Staff> lst = new List <Staff>(); AccessDB accessDB = new AccessDB(); OleDbParameter[] oleDbParameters = new OleDbParameter[] { new OleDbParameter("@TypeName", typeName) }; DataTable dt = accessDB.Get(SELECT_QUERY, oleDbParameters); if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { lst.Add(Util <Staff> .TransDataRowToAccount(dt.Rows[i])); } } return(lst); }
public DataTable GetAllVIP() { return(accessDB.Get(SQL_SELECT, null)); }