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)); }
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)); }
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)); }
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)); }
// 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)); }
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)); }
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)); }
// 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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
// 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)); }