public ActionResult Index(FormCollection collection)
        {
            string Designationn    = collection["Designation"];
            string Gradee          = collection["Grade"];
            string Travel_Purposee = collection["Travel_Purpose"];
            string fromdatee       = collection["FromDate"];
            string todatee         = collection["ToDate"];


            long?    Designation    = null;
            long?    Grade          = null;
            long?    Travel_Purpose = null;
            DateTime?FromDate       = null;
            DateTime?ToDate         = null;

            if (Designationn != "")
            {
                Designation = Convert.ToInt64(collection["Designation"]);
            }
            if (Gradee != "")
            {
                Grade = Convert.ToInt64(collection["Grade"]);
            }
            if (Travel_Purposee != "")
            {
                Travel_Purpose = Convert.ToInt32(collection["Travel_Purpose"]);
            }
            if (fromdatee != "")
            {
                FromDate = Convert.ToDateTime(collection["FromDate"]);
            }
            if (todatee != "")
            {
                ToDate = Convert.ToDateTime(collection["ToDate"]);
            }

            if (FromDate != null && ToDate == null)
            {
                ViewBag.EmployeeReportStatus = "please enter ToDate!";
                ViewBag.Designation          = db.HRMS_DESG_MS.Where(rec => rec.IsActive == true);
                ViewBag.Grade             = db.HRMS_CATEGORY_GRADE;
                ViewBag.dataTravelPurpose = new SelectList(db.HRMS_Travel_Purpose, "ID", "Name");
                return(View());
            }
            if (FromDate == null && ToDate != null)
            {
                ViewBag.EmployeeReportStatus = "please enter FromDate!";
                ViewBag.Designation          = db.HRMS_DESG_MS.Where(rec => rec.IsActive == true);
                ViewBag.Grade             = db.HRMS_CATEGORY_GRADE;
                ViewBag.dataTravelPurpose = new SelectList(db.HRMS_Travel_Purpose, "ID", "Name");
                return(View());
            }
            if (Designation == null && Grade == null && Travel_Purpose == null && FromDate == null && ToDate == null)
            {
                ViewBag.EmployeeReportStatus = "Please enter anyone option!";
                ViewBag.Designation          = db.HRMS_DESG_MS.Where(rec => rec.IsActive == true);
                ViewBag.Grade             = db.HRMS_CATEGORY_GRADE;
                ViewBag.dataTravelPurpose = new SelectList(db.HRMS_Travel_Purpose, "ID", "Name");
                return(View());
            }

            var modeldata = db.TravelApplicationExpanseReport(FromDate, ToDate, Travel_Purpose, Grade, Designation).ToList();

            TempData["Data"]          = modeldata;
            ViewBag.Designation       = db.HRMS_DESG_MS.Where(rec => rec.IsActive == true);
            ViewBag.Grade             = db.HRMS_CATEGORY_GRADE;
            ViewBag.dataTravelPurpose = new SelectList(db.HRMS_Travel_Purpose, "ID", "Name");
            return(View(modeldata));
        }