Ejemplo n.º 1
0
        // Get the list of the LBC to fill the drop down
        public ActionResult GetLBCList(string PaCode)
        {
            RegistrationBL _regbl = new RegistrationBL();

            ViewBag.search = string.IsNullOrEmpty(PaCode) ? string.Empty : PaCode;
            List <ProfileModel> lstModel = _regbl.GetListProfileByPaCode(PaCode);


            if (lstModel != null && lstModel.Count > 0)
            {
                List <ProfileModel> lst = new List <ProfileModel>();
                for (int i = 0; i < lstModel.Count; i++)
                {
                    ProfileModel item = new ProfileModel()
                    {
                        STARS_ID   = lstModel.ElementAt(i).STARS_ID,
                        FIRST_NAME = lstModel.ElementAt(i).FIRST_NAME + " " + lstModel.ElementAt(i).LAST_NAME
                    };
                    lst.Add(item);
                }
                return(Json(new
                {
                    error = 0,
                    lstModel = lst,
                }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { error = 1 }, JsonRequestBehavior.AllowGet));
            }
        }
Ejemplo n.º 2
0
        public ActionResult AddStoryAdmin(string search)
        {
            ViewBag.homeid = "story";
            RegistrationBL _regbl = new RegistrationBL();

            ViewBag.search = string.IsNullOrEmpty(search) ? string.Empty : search;
            List <ProfileModel> lstModel = _regbl.GetListProfileByPaCode(search);

            return(View(lstModel));
        }