示例#1
0
        /// <summary>
        /// International Sector Dropdown
        /// </summary>
        /// <returns></returns>
        public ActionResult InternationalSectorDropdown()
        {
            TSMSectorDropdownModel model = new TSMSectorDropdownModel();

            model.Populate();
            return(View("~/Views/Shared/PartialViews/Global/_SectorDropDown.cshtml", model));
        }
示例#2
0
        /// <summary>
        /// Get International nomenclature list
        /// </summary>
        /// <param name="sectorType"></param>
        /// <returns></returns>
        public JsonResult GetINTlist(int sectorType, int nomenlcatureType)
        {
            TSMSectorDropdownModel model = new TSMSectorDropdownModel();

            model.Populate((NomenclatureType)nomenlcatureType, (SectorType)sectorType);

            //return this.Json(model.Data, JsonRequestBehavior.AllowGet);
            return(this.Json(new { INTList = model.Data.Select(x => x.Value + "|" + x.Key + "|" + x.ClassName).ToList() }, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        /// <summary>
        /// Get ITC nomenclature list
        /// </summary>
        /// <param name="sectorType"></param>
        /// <returns></returns>
        public JsonResult GetITClist(int sectorType, int nomenlcatureType)
        {
            TSMSectorDropdownModel model = new TSMSectorDropdownModel();

            model.Populate((NomenclatureType)nomenlcatureType, (SectorType)sectorType);

            //return this.Json(model.Data, JsonRequestBehavior.AllowGet);
            return(this.Json(new { ITCList = model.Data.Select(x => x.Value + "|" + x.Key + "|" + x.ClassName).ToList() }, JsonRequestBehavior.AllowGet));


            //List<TSMSector> lstTSMSector = new List<TSMSector>();
            //try
            //{
            //    PrioritySectorModel PrioritysectorModel = new PrioritySectorModel();
            //    lstTSMSector = PrioritysectorModel.GetITClist(sectorType);
            //}
            //catch (Exception ex)
            //{
            //    ErrorLog.WriteLog("RecordController", "GetITClist", ex, sectorType);
            //}
            //return this.Json(new { ITCList = lstTSMSector.Select(x => x.Name + "|" + x.ID).ToList() }, JsonRequestBehavior.AllowGet);
        }