Beispiel #1
0
        public SelectList GetDropDownListByMasterCode(Enums.RefMasterCodes refMastercode)
        {
            var refValues = _commonService.PrepareSelectListByRefCode(refMastercode.ToString());

            SelectList dropDownList = new SelectList(refValues, Constants.REF_ID, Constants.REF_VALUE);

            return(dropDownList);
        }
        public ActionResult BindDesginations(string flag)
        {
            StringBuilder sbOptions = new StringBuilder();

            Enums.RefMasterCodes level = flag == "F" ? Enums.RefMasterCodes.FED_DESG : flag == "C" ? Enums.RefMasterCodes.CLUSTER_DESG : Enums.RefMasterCodes.GROUP_DESG;

            SelectList lstDesignations = GetDropDownListByMasterCode(level);

            foreach (var item in lstDesignations)
            {
                sbOptions.Append("<option value=" + item.Value + ">" + item.Text + "</option>");
            }

            return(Content(sbOptions.ToString()));
        }