Exemplo n.º 1
0
        /// <summary>
        /// get skill agregation for list box control
        /// </summary>
        protected void GetSkillAgregationListForDDL(string selectedAgregationIDs, bool hasExtraHeader = false)
        {
            if (string.IsNullOrEmpty(selectedAgregationIDs))
            {
                selectedAgregationIDs = "None";
            }
            List <SelectListItem> lstItem = new List <SelectListItem>();

            List <uspWFMGetAggregationResult> lstSkillAgregation = new List <uspWFMGetAggregationResult>();

            if (hasExtraHeader)
            {
                lstItem.Insert(0, new SelectListItem {
                    Text = "指定なし", Value = "0"
                });
            }
            using (WFMDBDataContext db = new WFMDBDataContext())
            {
                lstSkillAgregation = db.uspWFMGetAggregation(this.TenantID, this.TenantSpecialFlag).ToList();
            }
            foreach (var item in lstSkillAgregation)
            {
                lstItem.Add(new SelectListItem {
                    Text = item.vAggregationName, Value = item.iAggregationID.ToString(), Selected = selectedAgregationIDs.Contains(item.iAggregationID.ToString())
                });
            }
            ViewData["lstSkillAgregation"] = lstItem;
        }
        // GET: SkillAgregation
        public ActionResult Index()
        {
            List <uspWFMGetAggregationResult> lstSkillAgregation = new List <uspWFMGetAggregationResult>();

            using (WFMDBDataContext db = new WFMDBDataContext())
            {
                lstSkillAgregation = db.uspWFMGetAggregation(this.TenantID, this.TenantSpecialFlag).ToList();
            }
            return(View(lstSkillAgregation));
        }
Exemplo n.º 3
0
        /// <summary>
        /// get skill agregation for list box control
        /// </summary>
        protected void GetSkillAgregationListForDDL(string selectedAgregationIDs, bool hasExtraHeader = false)
        {
            if (string.IsNullOrEmpty(selectedAgregationIDs)) selectedAgregationIDs = "None";
            List<SelectListItem> lstItem = new List<SelectListItem>();

            List<uspWFMGetAggregationResult> lstSkillAgregation = new List<uspWFMGetAggregationResult>();
            if (hasExtraHeader)
            {
                lstItem.Insert(0, new SelectListItem { Text = "指定なし", Value = "0" });
            }
            using (WFMDBDataContext db = new WFMDBDataContext())
            {
                lstSkillAgregation = db.uspWFMGetAggregation(this.TenantID, this.TenantSpecialFlag).ToList();
            }
            foreach (var item in lstSkillAgregation)
            {
                lstItem.Add(new SelectListItem { Text = item.vAggregationName, Value = item.iAggregationID.ToString(), Selected = selectedAgregationIDs.Contains(item.iAggregationID.ToString()) });
            }
            ViewData["lstSkillAgregation"] = lstItem;
        }
Exemplo n.º 4
0
 // GET: SkillAgregation
 public ActionResult Index()
 {
     List<uspWFMGetAggregationResult> lstSkillAgregation = new List<uspWFMGetAggregationResult>();
     using (WFMDBDataContext db = new WFMDBDataContext())
     {
         lstSkillAgregation = db.uspWFMGetAggregation(this.TenantID, this.TenantSpecialFlag).ToList();
     }
     return View(lstSkillAgregation);
 }