コード例 #1
0
        public ActionResult Add()
        {
            DailyHours d = new DailyHours();

            d.getNames();
            return(View(d));
        }
コード例 #2
0
        public ActionResult Add(DailyHours h)
        {
            //if (ModelState.IsValid)
            /// {
            h.InsertDailyhours(h);
            ModelState.Clear();
            DailyHours d = new DailyHours();

            d.getNames();
            return(View(d));
            // }
            // else
            //     return View(h);
        }
コード例 #3
0
        public ActionResult Add(DailyHours h)
        {
            if (h == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            if (h == null)
            {
                return(HttpNotFound());
            }
            h.InsertDailyhours(h);
            ModelState.Clear();
            DailyHours d = new DailyHours();

            d.getNames();
            return(View(d));
        }