public static ScheduleTaskCollection Search(SearchFilter SearchKey) { ScheduleTaskCollection collection = new ScheduleTaskCollection(); using (var reader = SqlHelper.ExecuteReader("ScheduleTask_Search", SearchFilterManager.SqlSearchParam(SearchKey))) { while (reader.Read()) { ScheduleTask obj = new ScheduleTask(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public virtual DataTable ImportData(DataTable objList) { IEnumerable <ScheduleTask> myList = objList.ToList <ScheduleTask>(); ScheduleTaskCollection ErrorList = new ScheduleTaskCollection(); foreach (ScheduleTask objitem in myList) { try { Save(objitem); } catch (Exception objEx) { objitem.ErrorMesssage = "<div class='error'>" + objEx.Message + "</div>"; ErrorList.Add(objitem); } } return(ErrorList.ToDataTable <ScheduleTask>()); }
public static ScheduleTaskCollection GetbyUser(string CreatedUser, int CompanyID) { ScheduleTaskCollection collection = new ScheduleTaskCollection(); ScheduleTask obj; var sqlParams = new SqlParameter[] { new SqlParameter("@CreatedUser", CreatedUser), new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("ScheduleTask_GetAll_byUser", sqlParams)) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static ScheduleTaskCollection GetAllItem(int CompanyID) { ScheduleTaskCollection collection = new ScheduleTaskCollection(); var sqlParams = new SqlParameter[] { new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("ScheduleTask_GetAll", sqlParams)) { while (reader.Read()) { ScheduleTask obj = new ScheduleTask(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }