Exemplo n.º 1
0
 public void coursedata()
 {
     DataSet ds = null;
     Coursemaster course = new Coursemaster();
     course.Action = "Select";
     ds = course.coursemaster(course);
     ViewData["AllcouData"] = ds.Tables[0];
 }
Exemplo n.º 2
0
        //
        // GET: /Bookonline/
        public ActionResult Index(String seName, string location, String ObType, String price)
        {
            ViewBag.Type = ObType;
            if (ObType == "Course")
            {
                DataSet ds = null;
                Coursemaster course = new Coursemaster();
                course.Action = "Selectonslug";
                course.SlugName = seName;
                course.Location = location;
                ds = course.coursemaster(course);
                if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                {
                    ViewBag.CName = ds.Tables[0].Rows[0]["Name"].ToString();
                    ViewBag.Location = ds.Tables[0].Rows[0]["Location"].ToString();
                    ViewBag.Date = ds.Tables[0].Rows[0]["Date"].ToString();
                    String pri = ds.Tables[0].Rows[0]["Price"].ToString();
                    ViewBag.Fee = pri;
                    double gst1 = (Convert.ToDouble(pri) * 10 / 100);
                    ViewBag.gst = gst1.ToString("0.00");
                    double total1 = Convert.ToDouble(pri) + gst1;
                    ViewBag.total = total1.ToString("0.00");
                }
            }
            else if (ObType == "Online")
            {
                DataSet ds = null;
                OnlineCourseMaster course = new OnlineCourseMaster();
                course.Action = "Selectonslug";
                course.Slug_Name = seName;
                ds = course.OnlineCourseMasters(course);
                if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                {

                    ViewBag.CName = ds.Tables[0].Rows[0]["Name"].ToString();
                    String pri = ds.Tables[0].Rows[0]["price"].ToString();
                    ViewBag.Fee = pri;
                    double gst1 = (Convert.ToDouble(pri) * 10 / 100);
                    ViewBag.gst = gst1.ToString("0.00");
                    double total1 = Convert.ToDouble(pri) + gst1;
                    ViewBag.total = total1.ToString("0.00");
                }
            }
            else
            {
                ViewBag.CName = seName;
                ViewBag.Fee = price;
                double gst = (Convert.ToDouble(price) * 10 / 100);
                ViewBag.gst = gst;
                double total = Convert.ToDouble(price) + gst;
                ViewBag.total = total;
            }
            return View("~/Views/Home/Bookonline.cshtml");
        }
Exemplo n.º 3
0
 //
 // GET: /Home/
 public ActionResult Index()
 {
     DataSet ds = null;
     Coursemaster course = new Coursemaster();
     course.Action = "Select";
     ds = course.coursemaster(course);
     ViewData["AllcouData"] = ds.Tables[0];
     return View("~/Views/Home/Home.cshtml");
 }