Exemplo n.º 1
0
        public ActionResult Assigncity(string UserName)
        {
            listdetails objlst = new listdetails();

            try
            {
                objlst.objlist = context.SPgetProspectinglists().ToList();
                var selectedlist = context.SPgetprospectinglistbyuserid(UserName).FirstOrDefault();
                ViewBag.UserName = UserName;
                List <int> selectedlistIds = new List <int>();
                if (selectedlist != null && selectedlist.Count() > 0)
                {
                    selectedlistIds = selectedlist.Split(',').Select(int.Parse).ToList();
                }
                objlst.selectedlist = selectedlistIds;
            }
            catch (Exception ex)
            {
                cm.ErrorExceptionLogingByService(ex.ToString(), "ManageUser" + ":" + new StackTrace().GetFrame(0).GetMethod().Name, "Assigncity", "NA", "NA", "NA", "WEB");
            }
            return(View(objlst));
        }