Ejemplo n.º 1
0
        public ActionResult TeamDataAdd()
        {
            TeamDetailsDataModel defaultModel = new TeamDetailsDataModel();

            //defaultModel.Data.PUB_DT_STR = DateTime.UtcNow.AddHours(8).ToString("yyyy\\/MM\\/dd");
            //defaultModel.Data.DISABLE = false;
            defaultModel.Data.SQ = 1;
            //defaultModel.Data.HOME_PAGE_DISPLAY = true;
            TeamModule mdu    = new TeamModule();
            var        cities = mdu.GetCityData();

            TempData["cities"] = cities;
            return(View(defaultModel));
        }
Ejemplo n.º 2
0
        public ActionResult TeamDataEdit(int?ID)
        {
            if (!ID.HasValue)
            {
                return(RedirectToAction("TeamList"));
            }

            TeamDetailsDataModel model = new TeamDetailsDataModel();
            TeamModule           mdu   = new TeamModule();

            model = mdu.DoGetDetailsByID((int)ID);
            var cities = mdu.GetCityData();

            TempData["cities"] = cities;

            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult Index(int?page, string qry, string sort, string disable, int?city, int?area)
        {
            TeamListViewModel model = new TeamListViewModel();

            model.Filter.CurrentPage  = page ?? 1;
            model.Filter.QueryString  = qry ?? string.Empty;
            model.Filter.SortColumn   = sort ?? string.Empty;
            model.Filter.Disable      = disable ?? string.Empty;
            model.Filter.CityID       = city;
            model.Filter.AreaID       = area;
            model.Filter.DoPagination = false;
            TeamModule mdu = new TeamModule();

            model.Result = mdu.DoGetList(model.Filter);

            TempData["CityData"] = mdu.GetCityData();
            return(View("Team", model));
        }
Ejemplo n.º 4
0
        public JsonResult GetCityArea(int?ID)
        {
            CityModel result      = new CityModel();
            string    jsonDataStr = string.Empty;
            bool      success     = true;
            string    messages    = string.Empty;

            try
            {
                TeamModule mdu = new TeamModule();
                result      = mdu.GetCityData().Where(s => s.ID == ID).First();
                jsonDataStr = JsonConvert.SerializeObject(result);
            }
            catch (Exception ex)
            {
                success  = false;
                messages = ex.Message;
            }
            var resultJson = Json(new { success = success, data = jsonDataStr, messages = messages });

            return(resultJson);
        }