Exemple #1
0
        public ActionResult Uploads()
        {
            ObjectResult <UPLOAD_USERS_GET_Result> uploads = null;
            UpDownSearchModel model = null;

            ViewBag.Search_Division = new SelectList(db.SET_DIVISION, "DIVISION_NO", "DIVISION_NAME");
            ViewBag.Search_User     = new SelectList(db.SEC_USERS_GET_RPT_ZONAL(decimal.Parse(Session["sess_USER_NO"].ToString()),
                                                                                null, null, null).ToList(), "USER_NO", "USER_FULL_NAME");

            if (Request.QueryString.HasKeys())
            {
                model = new UpDownSearchModel();
                if (!string.IsNullOrEmpty(Request.QueryString["Search_Division"]) &&
                    decimal.Parse(Request.QueryString["Search_Division"]) != 0)
                {
                    model.Search_Division = decimal.Parse(Request.QueryString["Search_Division"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_Zilla"]) &&
                    decimal.Parse(Request.QueryString["Search_Zilla"]) != 0)
                {
                    model.Search_Zilla = decimal.Parse(Request.QueryString["Search_Zilla"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_Thana"]) &&
                    decimal.Parse(Request.QueryString["Search_Thana"]) != 0)
                {
                    model.Search_Thana = decimal.Parse(Request.QueryString["Search_Thana"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_User"]) &&
                    decimal.Parse(Request.QueryString["Search_User"]) != 0)
                {
                    model.Search_User = decimal.Parse(Request.QueryString["Search_User"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_From"]))
                {
                    model.Search_From = DateTime.Parse(Request.QueryString["Search_From"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_To"]))
                {
                    model.Search_To = DateTime.Parse(Request.QueryString["Search_To"]);
                }

                uploads = db.UPLOAD_USERS_GET(model.Search_Division, model.Search_Zilla,
                                              model.Search_Thana, model.Search_User, model.Search_From, model.Search_To);
            }

            ViewBag.Search_Model = model;

            return(View(uploads));
        }
Exemple #2
0
        public ActionResult Reset()
        {
            ObjectResult <DOWNLOAD_RESET_ZONAL_GET_Result> zonals = null;
            UpDownSearchModel model = null;

            decimal?USER_NO = decimal.Parse(Session["sess_USER_NO"].ToString());

            ViewBag.Search_Division = new SelectList(db.SET_DIVISION, "DIVISION_NO", "DIVISION_NAME");
            ViewBag.Search_User     = new SelectList(db.SEC_USERS_GET_RPT_ZONAL(USER_NO, null, null, null).ToList(),
                                                     "USER_NO", "USER_FULL_NAME");

            if (Request.QueryString.HasKeys())
            {
                model = new UpDownSearchModel();
                if (!string.IsNullOrEmpty(Request.QueryString["Search_Division"]) &&
                    decimal.Parse(Request.QueryString["Search_Division"]) != 0)
                {
                    model.Search_Division = decimal.Parse(Request.QueryString["Search_Division"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_Zilla"]) &&
                    decimal.Parse(Request.QueryString["Search_Zilla"]) != 0)
                {
                    model.Search_Zilla = decimal.Parse(Request.QueryString["Search_Zilla"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_Thana"]) &&
                    decimal.Parse(Request.QueryString["Search_Thana"]) != 0)
                {
                    model.Search_Thana = decimal.Parse(Request.QueryString["Search_Thana"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_User"]) &&
                    decimal.Parse(Request.QueryString["Search_User"]) != 0)
                {
                    model.Search_User = decimal.Parse(Request.QueryString["Search_User"]);
                }

                if (!string.IsNullOrEmpty(Request.QueryString["Search_To"]))
                {
                    model.Search_To = DateTime.Parse(Request.QueryString["Search_To"]);
                }



                zonals = db.DOWNLOAD_RESET_ZONAL_GET(USER_NO, model.Search_User, model.Search_Division,
                                                     model.Search_Zilla, model.Search_Thana);
            }

            ViewBag.Search_Model = model;

            return(View(zonals));
        }