public ActionResult dosearch(FormCollection form)
        {
            var sessionObj = Session["SessionBO"] as UserModel;

            if (sessionObj != null)
            {
                string selected_start = form["selected_start"];
                string selected_end   = form["selected_end"];

                string[] data      = selected_end.Split('-');
                string   new_start = data[1] + '-' + data[0] + '-' + data[2];

                string[] data1      = selected_start.Split('-');
                string   new_start1 = data1[1] + '-' + data1[0] + '-' + data1[2];


                DateTime selected_start1 = Convert.ToDateTime(new_start1, System.Globalization.CultureInfo.CurrentCulture);

                DateTime selected_end1 = Convert.ToDateTime(new_start, System.Globalization.CultureInfo.CurrentCulture);

                BOMDetails objBOMDetails = new BOMDetails();
                objBOMDetails.dosearch(selected_start1, selected_end1, sessionObj.id);
                GenericTextValue objGenericTextValue = new GenericTextValue();
                ViewBag.lstRefinery  = objGenericTextValue.GetSubRefineryList(sessionObj.id);
                ViewBag.IsAuthorized = sessionObj.isAuthorized;
                ViewBag.LoggedInUser = sessionObj.firstName;
                return(View("../Admin/MaterialList", objBOMDetails));
            }
            else
            {
                return(RedirectToAction("LoginUser", "Login"));
            }
        }
        public ActionResult GetPOList()
        {
            var sessionObj = Session["SessionBO"] as UserModel;

            if (sessionObj != null)
            {
                BOMDetails objBOMDetails = new BOMDetails();
                objBOMDetails.GetBOMDetailList(sessionObj.id);
                GenericTextValue objGenericTextValue = new GenericTextValue();
                ViewBag.lstRefinery  = objGenericTextValue.GetSubRefineryList(sessionObj.id);
                ViewBag.IsAuthorized = sessionObj.isAuthorized;
                ViewBag.LoggedInUser = sessionObj.firstName;
                return(View("../User/MaterialList", objBOMDetails));
            }
            else
            {
                return(RedirectToAction("LoginUser", "Login"));
            }
        }