示例#1
0
        public ActionResult Delete(int Id)
        {
            Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
            int result = bll.Delete(Id);

            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult UpdateSave(Book.Model.T_Base_Customer Customer)
        {
            Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
            int result = bll.Update(Customer);

            return(Redirect("Index"));
        }
示例#3
0
 public ActionResult Update(int Id)
 {
     Book.BLL.T_Base_Customer   bll = new BLL.T_Base_Customer();
     Book.Model.T_Base_Customer Customer;
     Customer         = bll.GetModal(Id);
     ViewBag.Customer = Customer;
     return(View());
 }
示例#4
0
        public JsonResult GetSearch(string Name = "", int matchCount = 10)
        {
            Name = Name.Trim();
            Book.BLL.T_Base_Customer          bll = new BLL.T_Base_Customer();
            List <Book.Model.T_Base_Customer> lst = bll.GetSearch(Name, matchCount);

            return(Json(lst));
        }
示例#5
0
        public JsonResult GetList(int pageSize, int pageNumber)
        {
            Book.BLL.T_Base_Customer          bll  = new BLL.T_Base_Customer();
            List <Book.Model.T_Base_Customer> list = bll.GetList(pageNumber, pageSize);
            int count = bll.GetCount();

            return(Json(new { total = count, rows = list }));
            //return Json(list);
        }
示例#6
0
 public ActionResult AddSave(string Name, string Tel, string Fax, string Memo)
 {
     Book.Model.T_Base_Customer Customer = new Model.T_Base_Customer();
     Customer.Name = Name;
     Customer.Tel  = Tel;
     Customer.Fax  = Fax;
     Customer.Memo = Memo;
     Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
     bll.Add(Customer);
     return(Redirect("Index"));
 }
示例#7
0
        public JsonResult GetList(int currentPage, String Name = "")
        {
            Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
            //List<Book.Model.T_Base_Customer> lst = bll.GetAll();
            List <Book.Model.T_Base_Customer> lst = bll.GetList(currentPage, PageSize, Name);

            ViewBag.Name = Name;
            int c = bll.GetCount(Name);

            return(Json(new { count = c, result = Json(lst) }));
        }
示例#8
0
        public ActionResult AddSave(string CustomerName, string CustomerPwd,
                                    string CustomerPostbox, string CustomerTel)
        {
            Book.Model.T_Base_Customer user = new Model.T_Base_Customer();
            user.CustomerName    = CustomerName;
            user.CustomerPwd     = CustomerPwd;
            user.CustomerPostbox = CustomerPostbox;
            user.CustomerTel     = CustomerTel;
            Book.BLL.T_Base_Customer userAddSave = new BLL.T_Base_Customer();
            int result = userAddSave.AddSave(user);

            return(Redirect("/Customer/Index"));
        }
示例#9
0
        public ActionResult Index(String Name = "")
        {
            Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();

            Book.Model.T_Base_Customer_Page page = bll.GetListPage(1, PageSize, Name);
            //List<Book.Model.T_Base_Customer> lst = bll.GetAll();
            ViewBag.MaxPageIndex = MaxPageIndex;

            ViewBag.PageSize = PageSize;

            ViewBag.lst   = page.list;
            ViewBag.count = page.count;
            return(View());
        }
示例#10
0
        public ActionResult AlterSave(int Id, string CustomerName,
                                      string CustomerPwd, string CustomerPostbox, string CustomerTel)
        {
            Book.BLL.T_Base_Customer   bll           = new BLL.T_Base_Customer();
            Book.Model.T_Base_Customer alterCustomer = new Model.T_Base_Customer();
            alterCustomer.Id              = Id;
            alterCustomer.CustomerName    = CustomerName;
            alterCustomer.CustomerPwd     = CustomerPwd;
            alterCustomer.CustomerPostbox = CustomerPostbox;
            alterCustomer.CustomerTel     = CustomerTel;
            bll.AlterSave(alterCustomer);

            return(RedirectToAction("Index"));
        }
示例#11
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());
        }
示例#12
0
        public JsonResult DeleteJson(int Id)
        {
            Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
            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));
        }
示例#13
0
 public JsonResult GetSearch(string query, int mathCount)
 {
     BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
     return(Json(bll.GetSearch(query, mathCount)));
 }
示例#14
0
 public ActionResult Alter(int Id)
 {
     Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
     ViewBag.user = bll.Alter(Id);
     return(View());
 }
示例#15
0
 public JsonResult Delete(string[] Ids)
 {
     Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer();
     return(Json(bll.Delete(Ids)));
 }