public static EmpLoanCollection GetAllItem() { EmpLoanCollection collection = new EmpLoanCollection(); using (var reader = SqlHelper.ExecuteReader("tblEmpLoan_GetAll", null)) { while (reader.Read()) { EmpLoan obj = new EmpLoan(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static EmpLoanCollection GetAllItembyCreatedUser(string CreatedUser) { EmpLoanCollection collection = new EmpLoanCollection(); using (var reader = SqlHelper.ExecuteReader("tblEmpLoan_GetAllByUser", new SqlParameter("@CreatedUser", CreatedUser))) { while (reader.Read()) { EmpLoan obj = new EmpLoan(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }