public ActionResult Delete(int Id) { Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer(); int result = bll.Delete(Id); return(RedirectToAction("Index")); }
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")); }
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()); }
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)); }
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); }
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")); }
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) })); }
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")); }
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()); }
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")); }
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()); }
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)); }
public JsonResult GetSearch(string query, int mathCount) { BLL.T_Base_Customer bll = new BLL.T_Base_Customer(); return(Json(bll.GetSearch(query, mathCount))); }
public ActionResult Alter(int Id) { Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer(); ViewBag.user = bll.Alter(Id); return(View()); }
public JsonResult Delete(string[] Ids) { Book.BLL.T_Base_Customer bll = new BLL.T_Base_Customer(); return(Json(bll.Delete(Ids))); }