示例#1
0
        public ActionResult customerpview1(string phoneno, string restcode)
        {
            if (phoneno != null)
            {
                var             p2     = "0";
                Ankapurservices objCrd = new Ankapurservices();
                var             od     = objCrd.custreports(phoneno, restcode);
                ViewBag.orders  = od.Count;
                ViewBag.phoneno = phoneno;
                foreach (var item in od)
                {
                    string amount = item.amountPaid;
                    if (amount == null || amount == "")
                    {
                        amount = "0";
                    }
                    PriceSum = PriceSum + decimal.Parse(amount);
                    p2       = String.Format(new CultureInfo("en-IN", false), "{0:n}", Convert.ToDouble(PriceSum));
                }
                ViewBag.Totalamount = p2;
                var od1  = objCrd.custdiscounts(phoneno, restcode).FirstOrDefault();
                var disc = (od1 != null) ? od1.Discount : "0";
                ViewBag.discount = disc;

                return(PartialView("customerpview1"));
                //return View();
                //return Content("<script> alert(phoneno); </script>");
            }
            return(PartialView("customerpview1", null));
        }