public static EmpTransCollection GetbyUser(string CreatedUser) { EmpTransCollection collection = new EmpTransCollection(); EmpTrans obj; using (var reader = SqlHelper.ExecuteReader("tblEmpTrans_GetAll_byUser", new SqlParameter("@CreatedUser", CreatedUser))) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static EmpTransCollection GetAllItem() { EmpTransCollection collection = new EmpTransCollection(); using (var reader = SqlHelper.ExecuteReader("tblEmpTrans_GetAll", null)) { while (reader.Read()) { EmpTrans obj = new EmpTrans(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }