public ActionResult FinalPost(int CategoryIdPost             = 0, int SubCategoryIdPost = 0,
                                      string SelectedSubCategoryName = "", string SelectedCategoryName = "")
        {
            List <ServiceCategoriesResponse> serviceDrop  = new List <ServiceCategoriesResponse>();
            List <CategoryDropHomeResponse>  catDropsHome = new List <CategoryDropHomeResponse>();

            if (Session["CatDrop"] != null)
            {
                catDropsHome = (List <CategoryDropHomeResponse>)Session["CatDrop"];
            }
            if (Session["ServiceDrop"] != null)
            {
                serviceDrop = (List <ServiceCategoriesResponse>)Session["ServiceDrop"];
            }
            ViewBag.CatsDrop    = catDropsHome;
            ViewBag.ServiceDrop = serviceDrop;


            List <USPGetOpeningDaysResponse> openingDays = new List <USPGetOpeningDaysResponse>();
            var odResponse = _categoryManagementService.GetOpeningDays();
            List <USPAddTypesReponse> adTypes = new List <USPAddTypesReponse>();
            var adResponse = _categoryManagementService.GetAddTypes();


            adTypes     = adResponse.Response;
            openingDays = odResponse.Response;

            int selectedAdTypeId     = 0;
            int selectedOpeningDayId = 0;

            ViewBag.OpeningDayId            = new SelectList(openingDays, "OpeningId", "DayTime", selectedOpeningDayId.ToString());
            ViewBag.AddTypeId               = new SelectList(adTypes, "AddTypeId", "AddTypeName", selectedAdTypeId.ToString());
            ViewBag.SubcategoryName         = SelectedSubCategoryName;
            ViewBag.SelectedSubCategoryName = SelectedSubCategoryName;
            ViewBag.SelectedCategoryName    = SelectedCategoryName;
            ViewBag.SubcategoryId           = SubCategoryIdPost;
            ViewBag.CategoryId              = CategoryIdPost;
            ViewBag.CategoryName            = SelectedCategoryName;
            ViewBag.CountryIdSelected       = 0;
            ViewBag.StateIdSelected         = 0;
            ViewBag.CityIdSelected          = 0;

            List <USPGetCountriesListResponse> Countries = new List <USPGetCountriesListResponse>();

            Countries         = _categoryManagementService.GetCountries();
            ViewBag.CountryId = new SelectList(Countries, "CountryId", "CountryName", "0");



            return(View());
        }
예제 #2
0
        public HttpResponseMessage AdTypeMaster()
        {
            try
            {
                //SqlParameter[] parameters = { new SqlParameter("@StateId", StateId) };

                var CategoryDrop = _categoryManagementService.GetAddTypes(StoredProceduresList.GetAddTypes,
                                                                          System.Data.CommandType.StoredProcedure, null);
                return
                    (Request.CreateResponse <ApiResponse <List <AddTypeMaster> > >(HttpStatusCode.OK, CategoryDrop));
            }
            catch (Exception ex)
            {
                return
                    (Request.CreateResponse <System.Exception>(HttpStatusCode.InternalServerError, ex));
            }
        }