コード例 #1
0
        public static hrm_atd_ScanTimeApprovalCollection GetAllItem(ScanTimeApprovalSqlParameters value)
        {
            hrm_atd_ScanTimeApprovalCollection collection = new hrm_atd_ScanTimeApprovalCollection();

            using (var reader = SqlHelper.ExecuteReaderService(ModuleConfig.MyConnection, "USP_TMS_ApproveTimeSheet_Get", value))
            {
                while (reader.Read())
                {
                    hrm_atd_ScanTimeApproval obj = new hrm_atd_ScanTimeApproval();
                    obj = GetItemFromReader(reader);
                    collection.Add(obj);
                }
            }
            return(collection);
        }
コード例 #2
0
        public static hrm_atd_ScanTimeApprovalCollection Search(ScanTimeApprovalSqlParameters SearchKey)
        {
            hrm_atd_ScanTimeApprovalCollection collection = new hrm_atd_ScanTimeApprovalCollection();

            var pars = new SqlParameter[]
            {
                new SqlParameter("@FromDate", SearchKey.FromDate),
                new SqlParameter("@ToDate", SearchKey.ToDate),
                new SqlParameter("@UserLoggedIn", SearchKey.UserLoggedIn),
                new SqlParameter("@ShowWaiting", SearchKey.ShowWaiting),
                new SqlParameter("@StartRow", SearchKey.StartRow),
                new SqlParameter("@EndRow", SearchKey.EndRow),
                new SqlParameter("@OrderBy", SearchKey.OrderBy),
                new SqlParameter("@OrderDirection", SearchKey.OrderDirection),
                new SqlParameter("@FilterBy", SearchKey.FilterBy),
                new SqlParameter("@ShowUnNoReg", SearchKey.ShowUnNoReg),
                new SqlParameter("@ShowUnNoReg", SearchKey.ShowUnNoReg),
                new SqlParameter("@Keyword", SearchKey.Keyword),
                new SqlParameter("@ColumnsName", SearchKey.ColumnsName),
                new SqlParameter("@Page", SearchKey.Page),
                new SqlParameter("@PageSize", SearchKey.PageSize),
                new SqlParameter("@Condition", SearchKey.Condition)
            };



            using (var reader = SqlHelper.ExecuteReaderService(ModuleConfig.MyConnection, "USP_TMS_ApproveTimeSheet_Get", pars))
            {
                while (reader.Read())
                {
                    hrm_atd_ScanTimeApproval obj = new hrm_atd_ScanTimeApproval();
                    obj = GetItemFromReader(reader);
                    collection.Add(obj);
                }
            }
            return(collection);
        }