Exemplo n.º 1
0
        public ActionResult Delete(int Id)
        {
            Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
            int result = bll.Delete(Id);

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public ActionResult UpdateSave(Book.Model.T_Base_Provider provider)
        {
            Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
            int result = bll.Update(provider);

            return(Redirect("Index"));
        }
Exemplo n.º 3
0
        public JsonResult GetList(int CurrentPage)
        {
            Book.BLL.T_Base_Provider          bll = new BLL.T_Base_Provider();
            List <Book.Model.T_Base_Provider> lst = bll.GetList(CurrentPage, PageSize);

            return(Json(lst));
        }
Exemplo n.º 4
0
        public JsonResult GetList(int PageSize, int PageNumber)  //要查找的页数的值
        {
            Book.BLL.T_Base_Provider          bll  = new BLL.T_Base_Provider();
            List <Book.Model.T_Base_Provider> list = bll.GetList(PageNumber, PageSize);
            int count = bll.GetCount();

            return(Json(new { total = count, rows = list }));
        }
Exemplo n.º 5
0
 public ActionResult Update(int Id)
 {
     Book.BLL.T_Base_Provider   bll = new BLL.T_Base_Provider();
     Book.Model.T_Base_Provider provider;
     provider         = bll.GetModal(Id);
     ViewBag.provider = provider;
     return(View());
 }
Exemplo n.º 6
0
        public JsonResult GetSearch(string Name = "", int matchCount = 10)
        {
            Name = Name.Trim();
            Book.BLL.T_Base_Provider          bll = new BLL.T_Base_Provider();
            List <Book.Model.T_Base_Provider> lst = bll.GetSearch(Name, matchCount);

            return(Json(lst));
        }
Exemplo n.º 7
0
 // GET: Book
 public ActionResult Index()
 {
     Book.BLL.T_Base_Provider        bll  = new BLL.T_Base_Provider();
     Book.Model.T_Base_Provider_Page page = bll.GetListPage(1, PageSize);
     ViewBag.MaxPageIndex = MaxPageIndex;
     ViewBag.PageSize     = PageSize;
     ViewBag.lst          = page.list;
     ViewBag.count        = page.count;
     return(View());
 }
Exemplo n.º 8
0
 public ActionResult AddSave(string Name, string Tel, string Fax, string Memo)
 {
     Book.Model.T_Base_Provider provider = new Model.T_Base_Provider();
     provider.Name = Name;
     provider.Tel  = Tel;
     provider.Fax  = Fax;
     provider.Memo = Memo;
     Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
     bll.Add(provider);
     return(Redirect("Index"));
 }
Exemplo n.º 9
0
        public ActionResult AddSave(string ProviderName, string ProviderTel, string Memo)
        {
            Book.Model.T_Base_Provider provider = new Model.T_Base_Provider();
            provider.ProviderName = ProviderName;
            provider.ProviderTel  = ProviderTel;
            provider.Memo         = Memo;

            Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
            int result = bll.AddSave(provider);

            return(Redirect("/Provider/Index"));
        }
Exemplo n.º 10
0
        public JsonResult GetList(int currentPage, String Name = "")
        {
            Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
            //List<Book.Model.T_Base_Provider> lst = bll.GetAll();
            List <Book.Model.T_Base_Provider> lst = bll.GetList(currentPage, PageSize, Name);

            ViewBag.Name = Name;

            int c = bll.GetCount(Name);

            return(Json(new { count = c, result = Json(lst) }));
        }
Exemplo n.º 11
0
        public ActionResult AddSave(string Name, string Tel, string Fax, string Memo)
        {
            Book.Model.T_Base_Provider item = new Model.T_Base_Provider();
            item.Name = Name;
            item.Tel  = Tel;
            item.Fax  = Fax;
            item.Memo = Memo;
            Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
            int result = bll.Add(item);

            return(Redirect("/Provider/Index"));
        }
Exemplo n.º 12
0
        public ActionResult AlterSave(int Id, string ProviderName, string ProviderTel, string Memo)
        {
            Book.BLL.T_Base_Provider   bll      = new BLL.T_Base_Provider();
            Book.Model.T_Base_Provider provider = new Model.T_Base_Provider();
            provider.Id           = Id;
            provider.ProviderName = ProviderName;
            provider.ProviderTel  = ProviderTel;
            provider.Memo         = Memo;
            bll.AlterSave(provider);

            return(RedirectToAction("Index"));
        }
Exemplo n.º 13
0
        public ActionResult Index()
        {
            Book.BLL.T_Base_Admin admin = new BLL.T_Base_Admin();
            ViewBag.admin = admin.GetCount();

            Book.BLL.T_Base_Book book = new BLL.T_Base_Book();
            ViewBag.book = book.GetCount();

            Book.BLL.T_Base_Provider provider = new BLL.T_Base_Provider();
            ViewBag.provider = provider.GetCount();

            Book.BLL.T_Base_Customer customer = new BLL.T_Base_Customer();
            ViewBag.customer = provider.GetCount();

            Book.BLL.T_Stock_Report stock = new BLL.T_Stock_Report();
            ViewBag.stock = stock.GetCount();


            return(View());
        }
Exemplo n.º 14
0
        public JsonResult DeleteJson(int Id)
        {
            Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
            int result = bll.Delete(Id);

            Book.Model.Message msg;
            if (result > 0)
            {
                msg = new Book.Model.Message()
                {
                    Code = 200, Content = "删除成功"
                };
            }
            else
            {
                msg = new Book.Model.Message()
                {
                    Code = 500, Content = "删除失败"
                };
            }
            return(Json(msg));
        }
Exemplo n.º 15
0
 public JsonResult Delete(string[] Ids)
 {
     Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
     return(Json(bll.Delete(Ids)));
 }
Exemplo n.º 16
0
 public JsonResult GetSearch(string query, int mathCount)
 {
     BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
     return(Json(bll.GetSearch(query, mathCount)));
 }
Exemplo n.º 17
0
 public ActionResult Alter(int Id)
 {
     Book.BLL.T_Base_Provider bll = new BLL.T_Base_Provider();
     ViewBag.provider = bll.Alter(Id);
     return(View());
 }