Example #1
0
 public ActionResult Index(int listid, string lstname, string cmpnyid = "")
 {
     if (listid != 0)
     {
         if (TempData["Message"] != null)
         {
             ViewBag.message = TempData["Message"];
         }
         ViewBag.listid = listid;
         var listname = context.Prospecting_Lists.Where(x => x.listid == listid).FirstOrDefault().listname;
         ViewBag.listname = listname;
         var citycirclelist = context.SPgetCitycirclelist(listid).Select(xx => new SelectListItem {
             Value = xx.ToString(), Text = xx.ToString()
         }).ToList();
         var Biztypelist = context.SPgetbiztype(listid).Select(xx => new SelectListItem {
             Value = xx.ToString(), Text = xx.ToString()
         }).ToList();
         var Titlelist = context.SPgettitle().Select(xx => new SelectListItem {
             Value = xx.ToString(), Text = xx.ToString()
         }).ToList();
         ViewData["citycirclelist"] = citycirclelist;
         ViewData["Biztypelist"]    = Biztypelist;
         ViewData["Titlelist"]      = Titlelist;
         if (cmpnyid != "")
         {
             TempData["compnyid"] = cmpnyid;
         }
         //return View("testlist");
         return(View());
     }
     else
     {
         return(RedirectToAction("Index", "ProspectListsAdmin"));
     }
 }
Example #2
0
        // GET: ProspectViewListClient
        public ActionResult Index(int listid, string lstname)
        {
            try
            {
                if (listid != 0)
                {
                    if (TempData["Message"] != null)
                    {
                        ViewBag.message = TempData["Message"];
                    }

                    ViewBag.listid = listid;
                    var listname = context.Prospecting_Lists.Where(x => x.listid == listid).FirstOrDefault().listname;
                    ViewBag.listname = listname;
                    var citycirclelist = context.SPgetCitycirclelist(listid).Select(xx => new SelectListItem {
                        Value = xx.ToString(), Text = xx.ToString()
                    }).ToList();
                    var Biztypelist = context.SPgetbiztype(listid).Select(xx => new SelectListItem {
                        Value = xx.ToString(), Text = xx.ToString()
                    }).ToList();
                    var Titlelist = context.SPgettitle().Select(xx => new SelectListItem {
                        Value = xx.ToString(), Text = xx.ToString()
                    }).ToList();
                    ViewData["citycirclelist"] = citycirclelist;
                    ViewData["Biztypelist"]    = Biztypelist;
                    ViewData["Titlelist"]      = Titlelist;
                }
                else
                {
                    return(RedirectToAction("Index", "ProspectListsClient"));
                }
            }
            catch (Exception ex)
            {
                cm.ErrorExceptionLogingByService(ex.ToString(), "ProspectViewListClient" + ":" + new StackTrace().GetFrame(0).GetMethod().Name, "Index", "NA", "NA", "NA", "WEB");
            }
            return(View());
        }