Esempio n. 1
0
        public ActionResult Search([Bind(Include = "Nr, Name, Id, Sex, JobTitleId, CompanyId, DepartmentId, CompanyEmployAtFrom, CompanyEmployAtTo, IsOnTrial")] StaffSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IStaffService ss = new StaffService(Settings.Default.db);

            IPagedList <Staff> staffs = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            Staff staff = new Staff();

            staff.companyId    = Convert.ToInt16(q.companyId);
            staff.departmentId = Convert.ToInt16(q.departmentId);
            //防止SetSexList 抛出异常
            if (q.Sex.HasValue)
            {
                staff.sex = Convert.ToString(q.Sex);
            }
            staff.jobTitleId = q.JobTitleId;
            staff.isOnTrial  = Convert.ToBoolean(q.IsOnTrial);
            SetDropDownList(staff);

            ViewBag.Query = q;

            return(View("Index", staffs));
        }
Esempio n. 2
0
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            CertificateSearchModel q = new CertificateSearchModel();

            ICertificateService ss = new CertificateService(Settings.Default.db);

            q.StaffActNr = this.Request.QueryString["nr"];
            IPagedList <Certificate> certfs = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            CertificateInfoModel info = ss.GetCertificateInfo(q);

            ViewBag.Info = info;

            //get staff info
            string        staffNr = this.Request.QueryString["nr"];
            IStaffService sts     = new StaffService(Settings.Default.db);

            Staff stfModel = sts.FindByNr(staffNr);

            ViewBag.StfModel = stfModel;


            return(View(certfs));
        }
Esempio n. 3
0
        public ActionResult Index(int?page)
        {
            int pageIndex                 = PagingHelper.GetPageIndex(page);
            ITaskRoundService      ss     = new TaskRoundService(Settings.Default.db);
            IPagedList <TaskRound> rounds = ss.List().ToPagedList(pageIndex, Settings.Default.pageSize);

            return(View(rounds));
        }
        public ActionResult Index(int?page)
        {
            int pageIndex             = PagingHelper.GetPageIndex(page);
            RequirementSearchModel q  = new RequirementSearchModel();
            IRequirementService    rs = new RequirementService(Settings.Default.db);

            IPagedList <Requirement> requirements = rs.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;
            SetRequirementStatusList(null);
            return(View(requirements));
        }
        public ActionResult Index(int?page)
        {
            int               pageIndex = PagingHelper.GetPageIndex(page);
            MRPSearchModel    q         = new MRPSearchModel();
            ICalculateService cs        = new CalculateService(Settings.Default.db);

            IPagedList <MrpRound> rounds = cs.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;
            SetMrpRoundStatusList(null);
            return(View(rounds));
        }
Esempio n. 6
0
        public ActionResult Index(int?page)
        {
            int pageIndex                       = PagingHelper.GetPageIndex(page);
            DepartmentSearchModel   q           = new DepartmentSearchModel();
            IPagedList <Department> departments = departmentService.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetCompanyList(null);

            return(View(departments));
        }
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);
            AttendanceRecordDetailSearchModel q  = new AttendanceRecordDetailSearchModel();
            IAttendanceRecordDetailService    ss = new AttendanceRecordDetailService(Settings.Default.db);

            IPagedList <AttendanceRecordDetailView> records = ss.SearchDetailView(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;
            SetShiftList();
            return(View(records));
        }
Esempio n. 8
0
        // GET: Mps
        public ActionResult Index(int?page)
        {
            int           pageIndex = PagingHelper.GetPageIndex(page);
            MpsSeachModel q         = new MpsSeachModel();
            IMpsService   ms        = new MpsService(Settings.Default.db);

            IPagedList <MP> mps = ms.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetMpStatusDisplayList(null);
            return(View(mps));
        }
Esempio n. 9
0
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            StockSearchModel q = new StockSearchModel();

            IStockService ss = new StockService(Settings.Default.db);

            IPagedList <Stock> stocks = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(stocks));
        }
Esempio n. 10
0
        public ActionResult SumOfStock([Bind(Include = "PartNr")] SumOfStockSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            ISumOfStockService      sos        = new SumOfStockService(Settings.Default.db);
            IPagedList <SumOfStock> sumOfStock = sos.SearchSumOfStock(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(sumOfStock));
        }
Esempio n. 11
0
        // GET: PVC
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            PVCSearchModel q = new PVCSearchModel();

            IPVCService us = new PVCService(Settings.Default.db, Session["user"] as User);

            IPagedList <PVC> pvcs = us.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(pvcs));
        }
Esempio n. 12
0
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            CompanySearchModel q = new CompanySearchModel();

            ICompanyService ss = new CompanyService(Settings.Default.db);

            IPagedList <Company> companies = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(companies));
        }
Esempio n. 13
0
        public ActionResult StockReport(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            DashboardSearchModel q = new DashboardSearchModel();

            IStockSumRecordService sss = new StockSumRecordService(Properties.Settings.Default.db);

            IPagedList <StockSumRecord> stockSumRecord = sss.SearchStockReport(q).ToPagedList(pageIndex, Properties.Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(stockSumRecord));
        }
Esempio n. 14
0
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            BatchOrderTemplateSearchModel q = new BatchOrderTemplateSearchModel();

            IBatchOrderTemplateService bot = new BatchOrderTemplateService(Settings.Default.db);

            IPagedList <BatchOrderTemplate> bots = bot.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(bots));
        }
Esempio n. 15
0
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            UserSearchModel q = new UserSearchModel();

            IUserService ss = new UserService(Settings.Default.db);

            IPagedList <User> users = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(users));
        }
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);
            StockMovementSearchModel q  = new StockMovementSearchModel();
            IStockMovementService    ss = new StockMovementService(Settings.Default.db);

            IPagedList <StockMovement> stockMovements = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetMoveTypeDisplayList(null);

            return(View(stockMovements));
        }
Esempio n. 17
0
        public ActionResult Index(int?page)
        {
            int             pageIndex = PagingHelper.GetPageIndex(page);
            PartSearchModel q         = new PartSearchModel();
            IPartService    ps        = new PartService(Settings.Default.db);

            IPagedList <Part> parts = ps.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetPartTypeList(null);

            return(View(parts));
        }
Esempio n. 18
0
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            BomSearchModel q = new BomSearchModel();

            IBomService bs = new BomService(Settings.Default.db);

            IPagedList <BOM> boms = bs.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View(boms));
        }
Esempio n. 19
0
        public ActionResult Search([Bind(Include = "OrderNr, PartNr, Type, Remark1")] BatchOrderTemplateSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IBatchOrderTemplateService bot = new BatchOrderTemplateService(Settings.Default.db);

            IPagedList <BatchOrderTemplate> bots = bot.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", bots));
        }
Esempio n. 20
0
        public ActionResult Search([Bind(Include = "name, shipDateFrom, shipDateTo, peNum, brand ,batchNo, startTimeFrom, startTimeTo, endTimeFrom, endTimeTo, createdAtFrom, createdAtTo")] PVCSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IPVCService us = new PVCService(Settings.Default.db, Session["user"] as User);

            IPagedList <PVC> pvcs = us.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", pvcs));
        }
Esempio n. 21
0
        public ActionResult Search([Bind(Include = "PartNr,PartNrAct,FIFOFrom,FIFOTo,QuantityFrom,QuantityTo,Wh,Position")] StockSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            ViewBag.Query = q;

            IStockService ss = new StockService(Settings.Default.db);

            IPagedList <Stock> stocks = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            return(View("Index", stocks));
        }
        public ActionResult Search([Bind(Include = "PartNr,PartNrAct, DateFrom, DateTo, MoveType")] StockMovementSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IStockMovementService      ss             = new StockMovementService(Settings.Default.db);
            IPagedList <StockMovement> stockMovements = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetMoveTypeDisplayList(q.MoveType);
            return(View("Index", stockMovements));
        }
Esempio n. 23
0
        public ActionResult Search([Bind(Include = "StaffNr,StaffNrAct,ScheduleAtFrom,ScheduleAtEnd")]  ShiftScheduleSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IShiftScheduleService ss = new ShiftSheduleService(Settings.Default.db);

            IPagedList <ShiftSchedule> models = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", models));
        }
Esempio n. 24
0
        public ActionResult SearchStockReports([Bind(Include = "PartNr, DateFrom, DateTo")] DashboardSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IStockSumRecordService sss = new StockSumRecordService(Properties.Settings.Default.db);

            IPagedList <StockSumRecord> stockSumRecord = sss.SearchStockReport(q).ToPagedList(pageIndex, Properties.Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("StockReport", stockSumRecord));
        }
        public ActionResult Search([Bind(Include = "CompanyId,DepartmentId,StaffNr,RecordAtFrom,RecordAtEnd")] AttendanceRecordDetailSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IAttendanceRecordDetailService ss = new AttendanceRecordDetailService(Settings.Default.db);

            IPagedList <AttendanceRecordDetailView> records = ss.SearchDetailView(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;
            SetShiftList();
            return(View("Index", records));
        }
Esempio n. 26
0
        public ActionResult Search([Bind(Include = "StaffActNr")] CertificateSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            ICertificateService ss = new CertificateService(Settings.Default.db);

            IPagedList <Certificate> certfs = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", certfs));
        }
Esempio n. 27
0
        public ActionResult Search([Bind(Include = "ID, PartNr, VFFrom, VFTo, VTFrom, VTTo")] BomSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IBomService bs = new BomService(Settings.Default.db);

            IPagedList <BOM> boms = bs.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", boms));
        }
Esempio n. 28
0
        public ActionResult Search([Bind(Include = "Name")] CompanySearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            ICompanyService ss = new CompanyService(Settings.Default.db);

            IPagedList <Company> companies = ss.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            return(View("Index", companies));
        }
        public ActionResult Search([Bind(Include = "PartNr,OrderedDateFrom,OrderedDateTo,RequiredTimeFrom,RequiredTimeTo,QuantityFrom,QuantityTo,Status,DerivedFrom,DerivedType,OrderNr")] RequirementSearchModel q)
        {
            int pageIndex = 0;

            int.TryParse(Request.QueryString.Get("page"), out pageIndex);
            pageIndex = PagingHelper.GetPageIndex(pageIndex);

            IRequirementService      rs           = new RequirementService(Settings.Default.db);
            IPagedList <Requirement> requirements = rs.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetRequirementStatusList(q.Status);
            return(View("Index", requirements));
        }
Esempio n. 30
0
        // GET: User
        public ActionResult Index(int?page)
        {
            int pageIndex = PagingHelper.GetPageIndex(page);

            UserSearchModel q = new UserSearchModel();

            IUserService us = new UserService(Settings.Default.db, Session["user"] as User);

            IPagedList <User> users = us.Search(q).ToPagedList(pageIndex, Settings.Default.pageSize);

            ViewBag.Query = q;

            SetRoleTypeList(q.roleType);

            return(View(users));
        }