예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
 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());
 }
예제 #4
0
파일: EditBill.cs 프로젝트: CodeHunterZ/BMS
        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("保存失败!");
            }
        }
예제 #5
0
        public ActionResult AddBill(Bill AddData)
        {
            var Flag = new BillBll().Add(AddData) != 0;

            return(Content(Flag.ToString()));
        }