Ejemplo n.º 1
0
        /// <summary>
        /// get all the skill group
        /// </summary>
        /// <param name="selectedGroupIDs">these group ids are seleted </param>
        protected void GetSkillGroupListNoWithSkillAgregationForDDL(string selectedGroupIDs, bool hasExtraHeader = false)
        {
            if (string.IsNullOrEmpty(selectedGroupIDs))
            {
                selectedGroupIDs = "None";
            }
            List <SelectListItem>            lstItem       = new List <SelectListItem>();
            List <uspWFMGetSkillGroupResult> lstSkillGroup = new List <uspWFMGetSkillGroupResult>();

            if (hasExtraHeader)
            {
                lstItem.Insert(0, new SelectListItem {
                    Text = "指定なし", Value = "0"
                });
            }
            using (WFMDBDataContext db = new WFMDBDataContext())
            {
                lstSkillGroup = db.uspWFMGetSkillGroup(this.TenantID).ToList();
            }
            foreach (var item in lstSkillGroup)
            {
                if (lstItem.Find(p => p.Value == item.iGroupProfileID.ToString()) != null)
                {
                    continue;
                }
                lstItem.Add(new SelectListItem {
                    Text = item.vCompany, Value = item.iGroupProfileID.ToString(), Selected = selectedGroupIDs.Contains(item.iGroupProfileID.ToString())
                });
            }
            ViewData["lstSkillGroup"] = lstItem;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// get all the skill group
        /// </summary>
        /// <param name="skillAgregationID">skill group in current skill agregation </param>
        protected void GetSkillGroupListForDDL(int skillAgregationID, bool hasExtraHeader = false)
        {
            List <SelectListItem>            lstItem       = new List <SelectListItem>();
            List <uspWFMGetSkillGroupResult> lstSkillGroup = new List <uspWFMGetSkillGroupResult>();

            using (WFMDBDataContext db = new WFMDBDataContext())
            {
                lstSkillGroup = db.uspWFMGetSkillGroup(this.TenantID).ToList();
            }
            if (hasExtraHeader)
            {
                lstItem.Insert(0, new SelectListItem {
                    Text = "指定なし", Value = "0"
                });
            }
            foreach (var item in lstSkillGroup)
            {
                lstItem.Add(new SelectListItem {
                    Text = item.vCompany, Value = item.iGroupProfileID.ToString(), Selected = (item.iAggregationID.Equals(skillAgregationID))
                });
            }
            ViewData["lstSkillGroup"] = lstItem;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// get all the skill group 
 /// </summary>
 /// <param name="selectedGroupIDs">these group ids are seleted </param>
 protected void GetSkillGroupListNoWithSkillAgregationForDDL(string selectedGroupIDs, bool hasExtraHeader = false)
 {
     if (string.IsNullOrEmpty(selectedGroupIDs)) selectedGroupIDs = "None";
     List<SelectListItem> lstItem = new List<SelectListItem>();
     List<uspWFMGetSkillGroupResult> lstSkillGroup = new List<uspWFMGetSkillGroupResult>();
     if (hasExtraHeader)
     {
         lstItem.Insert(0, new SelectListItem { Text = "指定なし", Value = "0" });
     }
     using (WFMDBDataContext db = new WFMDBDataContext())
     {
         lstSkillGroup = db.uspWFMGetSkillGroup(this.TenantID).ToList();
     }
     foreach (var item in lstSkillGroup)
     {
         if (lstItem.Find(p => p.Value == item.iGroupProfileID.ToString()) != null)
             continue;
         lstItem.Add(new SelectListItem { Text = item.vCompany, Value = item.iGroupProfileID.ToString(), Selected = selectedGroupIDs.Contains(item.iGroupProfileID.ToString()) });
     }
     ViewData["lstSkillGroup"] = lstItem;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// get all the skill group 
        /// </summary>
        /// <param name="skillAgregationID">skill group in current skill agregation </param>
        protected void GetSkillGroupListForDDL(int skillAgregationID, bool hasExtraHeader = false)
        {
            List<SelectListItem> lstItem = new List<SelectListItem>();
            List<uspWFMGetSkillGroupResult> lstSkillGroup = new List<uspWFMGetSkillGroupResult>();

            using (WFMDBDataContext db = new WFMDBDataContext())
            {
                lstSkillGroup = db.uspWFMGetSkillGroup(this.TenantID).ToList();
            }
            if (hasExtraHeader)
            {
                lstItem.Insert(0, new SelectListItem { Text = "指定なし", Value = "0" });
            }
            foreach (var item in lstSkillGroup)
            {
                lstItem.Add(new SelectListItem { Text = item.vCompany, Value = item.iGroupProfileID.ToString(), Selected = (item.iAggregationID.Equals(skillAgregationID)) });
            }
            ViewData["lstSkillGroup"] = lstItem;
        }