Example #1
0
        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);
        }
Example #2
0
        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>());
        }
Example #3
0
        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);
        }
Example #4
0
        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);
        }