public ActionResult Bill(int page, int limit, Bill t) { var bll = new BillBll(); var List = bll.SelectList() .Where(i => IsTrue(i.ProductId, t.ProductId) && IsTrue(i.BillNum, t.BillNum) && isTrue(i.BillType, t.BillType) && isTrue(i.BillTime.ToString(), t.BillTime) ) .Select(i => new { i.BillId, ProductId = i.product.ProductName, i.BillNum, i.BillType, BillTime = i.BillTime.ToString(), }); var ListJson = new { code = 0, msg = "", count = List.Count(), data = List.Skip((page - 1) * limit).Take(limit).ToList() }; return(Json(ListJson, JsonRequestBehavior.AllowGet)); }
public ActionResult GetData() { var list = new BillBll().Select(); var data = new { type = list.Select(i => (i.type)), money = list.Select(i => (i.money)) }; return(Json(data, JsonRequestBehavior.AllowGet)); }
public UnitOfWork() { productBll = new ProductBll(new ProductDal()); bannerBll = new BannerBll(new BannerDal()); billBll = new BillBll(new BillDal()); categoryBll = new CategoryBll(new CategoryDal()); companyInformationBll = new CompanyInformationBll(new CompanyInformationDal()); phoneBll = new PhoneBll(new PhoneDal()); reviewBll = new reviewBll(new reviewDal()); rezervationBll = new rezervationBll(new rezervationDal()); roleBll = new roleBll(new roleDal()); roleOfUserBll = new roleOfUserBll(new roleOfUserDal()); saleProductBll = new SaleProductBll(new SaleProductDal()); saleProductsDetailBll = new SaleProductsDetailBll(new SaleProductsDetailDal()); serviceBll = new serviceBll(new serviceDal()); userBll = new userBll(new userDal()); }
private void skinButton1_Click(object sender, System.EventArgs e) { Bill bill = new Bill(); bill.Balance = decimal.Parse(this.txtBalance.Text); bill.CompanyName = this.txtCompany.Text; bill.Deadline = int.Parse(this.txtDeadline.Text); bill.EveryMonthPayment = decimal.Parse(this.txtEveryMonthPayment.Text); bill.Note = this.txtNote.Text; bill.PayType = int.Parse(this.lbPayType.ValueMember); bill.Phone = this.txtPhone.Text; bill.RealPayment = decimal.Parse(this.txtRealPayment.Text); bill.RecordTime = System.DateTime.Now; bill.StarTime = DateTime.Parse(this.ctlStartTime.text); bill.Status = 0; if (BillBll.GetInstance().addBill(bill) == 1) { MessageBox.Show("保存成功!"); } else { MessageBox.Show("保存失败!"); } }
public ActionResult AddBill(Bill AddData) { var Flag = new BillBll().Add(AddData) != 0; return(Content(Flag.ToString())); }