public ActionResult extractdate() { DateTime start = DateTime.Parse(Request.Form["txtsd"]); DateTime end = DateTime.Parse(Request.Form["txted"]); l = DBoperations.Empdate(start, end); ViewBag.list = l; return(View("DateView")); }
public ActionResult radiobtn() { dlist = DBoperations.getDepts(); ViewBag.d = dlist; if (Request.Form["txtsd"] != null && Request.Form["txted"] != null) { DateTime start = DateTime.Parse(Request.Form["txtsd"]); DateTime end = DateTime.Parse(Request.Form["txted"]); l = DBoperations.Empdate(start, end); ViewBag.list = l; } if (Request.Form["ddldeptno"] != null) { int deptno = int.Parse(Request.Form["ddldeptno"]); l = DBoperations.Getdept(deptno); ViewBag.list = l; } return(View("Index")); }