コード例 #1
0
        public ActionResult Dashboard()
        {
            ViewBag.Area = AvailableArea.AllArea();
            var orderlist = orderRepo.GetAll().Where(x => x.Status == "Confirmed").ToList();

            return(View(orderlist));
        }
コード例 #2
0
        public ActionResult Dashboard()
        {
            Order data = orderRepo.GetAll().Where(x => x.Status == "Pending" || x.Status == "Returned").FirstOrDefault();

            double TotalPrice = 0;

            foreach (var item in data.OrderDatas)
            {
                TotalPrice += item.ActualPrice;
            }
            ViewBag.Price = TotalPrice;

            if (data == null)
            {
                return(RedirectToAction("Index", "Salesman"));
            }

            //var stock = stockRepo.GetAll().Where(x => x.Book_Id == data.Book_Id).FirstOrDefault();
            //ViewBag.AvailableStock = stock.OrderStock;

            //double price = Convert.ToDouble(data.Book.Price);
            //double discount = Convert.ToDouble(data.Book.DiscountRate);
            //double ActualPrice = price - ((discount * price) / 100.0);

            int CuponDiscount;

            if (data.Coupon_Id != null)
            {
                CuponDiscount = data.Coupon.Percentage;
                ViewBag.Cupon = CuponDiscount;
            }
            if (ViewBag.Cupon == null)
            {
                ViewBag.Cupon = 0;
            }
            //ViewBag.BookPrice = ActualPrice;

            //List<string> AreaList = new List<string>();
            //AreaList.Add("Gulshan");
            //AreaList.Add("Banani");
            //AreaList.Add("Dhanmondi");
            //AreaList.Add("Nikunjo");
            //AreaList.Add("Badda");
            //AreaList.Add("Basundhara");
            ViewBag.Area = AvailableArea.AllArea();

            return(View(data));
        }
コード例 #3
0
 public bool CheckSecurityPermission(AvailableArea Origin)
 {
     return(CssContext.Instance.Host.HasAuthority("can make tea"));
 }
コード例 #4
0
ファイル: frmClientTab.cs プロジェクト: joncoello/CSExample
 public bool CheckSecurityPermission(AvailableArea Origin)
 {
     return CssContext.Instance.Host.HasAuthority("can make tea");
 }