Exemplo n.º 1
0
        public ActionResult List(string searchKey, int?page)
        {
            WebView.WebService._base myWebService;
            myWebService = new WebService._base();

            WebService._base.ListDllMaster DllM = new WebService._base.ListDllMaster();
            System.Diagnostics.Debug.WriteLine(searchKey);
            System.Diagnostics.Debug.WriteLine("a");
            if (searchKey != null)
            {
                if (searchKey.Equals(""))
                {
                    DllM = myWebService.GetDllMasterMaintenance(0, 1000, null);
                    ViewBag.searchKey = searchKey;
                }
                else
                {
                    DllM = myWebService.GetDllMasterMaintenance(0, 1000, searchKey);
                    ViewBag.searchKey = searchKey;
                }
            }
            else
            {
                DllM = myWebService.GetDllMasterMaintenance(0, 1000, null);
                ViewBag.searchKey = "";
            }

            string input = "\\\\adsvr";
            //string input = "\\\\server\\d$\\x\\y\\z\\AAA";
            string output = String.Format("http:{0}", input.Replace("\\d$\\x\\y", String.Empty).Replace("\\", "/"));

            ViewBag.output = output;

            int pageSize   = 10;
            int pageNumber = (page ?? 1);

            return(View(DllM.DllMasterList.ToPagedList(pageNumber, pageSize)));
        }