public ActionResult Index(string Code = "", string Name   = "", int AddressToId = 0,
                           int Type    = 0, int Department = 0, int Status       = 0, int Priority = 0, string DateFrom = "", int page = 1, int pageSize = 10)
 {
     #region lưu lại thông tin tìm
     ViewBag.AddressToId = AddressToId;
     ViewBag.Type        = Type;
     ViewBag.Status      = Status;
     ViewBag.Priority    = Priority;
     #endregion
     ViewBag.FilePatch = _FilePath;
     int totalRow = 0;
     if (AddressToId > 0)
     {
         var department = _ipldepartment.ViewDetail(AddressToId);
         if (department != null)
         {
             ViewBag.departmentname = department.Name;
         }
     }
     #region load dropdownlist các lựa chọn tìm kiếm
     ViewData["dispatchtypeAll"]   = _ipldispatchtype.ListAll();
     ViewData["dispatchstatusAll"] = _ipldispatchstatus.ListAll();
     ViewData["departmentAll"]     = _ipldepartment.ListAllByTreeView();
     #endregion
     var dispatchIn = _ipldispatchin.ListAllPaging(Code, Name, Type, Department, Status, Priority,
                                                   DateFrom, AddressToId, page, pageSize, ref totalRow);
     return(View(dispatchIn.ToPagedList(page, pageSize, totalRow)));
 }
        public ActionResult Index(string Code = "", string Name   = "", int DepartmentId = 0,
                                  int Type    = 0, int Department = 0, int Status        = 0, int Priority = 0, string DateWrite = "", int page = 1, int pageSize = 10)
        {
            #region lưu lại thông tin tìm

            ViewBag.DepartmentId = DepartmentId;
            ViewBag.Type         = Type;
            ViewBag.Status       = Status;
            ViewBag.Priority     = Priority;
            #endregion
            ViewBag.FilePatch = _FilePath;
            int totalRow = 0;
            if (DepartmentId > 0)
            {
                var department = _ipldepartment.ViewDetail(DepartmentId);
                ViewBag.departmentname = department.Name;
            }
            #region load dropdownlist các lựa chọn tìm kiếm
            var dispatchtypeAll = _ipldispatchtype.ListAll();
            ViewData["dispatchtypeAll"] = dispatchtypeAll;
            var departmentAll = _ipldepartment.ListAll();
            ViewData["departmentAll"] = departmentAll;

            var dispatchstatusAll = _ipldispatchstatus.ListAll();
            ViewData["dispatchstatusAll"] = dispatchstatusAll;
            #endregion

            var dispatchOut = _ipldispatchout.ListAllPaging(Code, Name, Type, Department, Status, Priority,
                                                            DateWrite, DepartmentId, page, pageSize, ref totalRow);
            return(View(dispatchOut.ToPagedList(page, pageSize, totalRow)));
        }
Ejemplo n.º 3
0
        public ActionResult _MenuStatusDisIn()
        {
            var dispatchstatus = _ipldispatchstatus.ListAll();

            return(View(dispatchstatus));
        }