public JsonResult Application_Create2(ApplicationModel applicationModel)
        {
            if (applicationModel != null && ModelState.IsValid)
            {
                try
                {
                    var application = new Application
                    {
                        ApplicationName = applicationModel.ApplicationName,
                        VendorVendorId  = applicationModel.VendorVendorId,
                        ClaimSetName    = applicationModel.ClaimSetName
                    };
                    int profile = applicationModel.ProfileId.GetValueOrDefault();
                    if (profile > 0)
                    {
                        application.Profiles.Add(_profileBusiness.GetById(profile));
                    }
                    _applicationBusiness.Create(WamsUser.WamsId, application);
                    _applicationBusiness.SaveChanges(WamsUser.WamsId);
                }
                catch (Exception)
                {
                    return(Json(new
                    {
                        success = false,
                        Errors = string.Format("Could not create application {0}", applicationModel.ApplicationName)
                    }));
                }
            }

            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }
        // GET: Profile
        public ActionResult Index()
        {
            ViewBag.SessionValue = Session[CommonStrings.DefaultSession].ToString();

            SessionMasterModel objSessionModel = new SessionMasterModel();

            objBDCCommon = new CommonMasterDataBusiness();

            var SessionType = objBDCCommon.GetSessionMaster();

            objSessionModel.SessionList = new SelectList(SessionType, "SessionId", "Title");
            ViewBag.SessionInfo         = objSessionModel.SessionList;

            ProfileCustomModel objModel = new ProfileCustomModel();

            objBDC             = new ProfileBusiness();
            objModel.SessionId = Convert.ToInt32(Session[CommonStrings.DefaultSession]);
            var rs = objBDC.GetById(objModel.SessionId);

            return(View(rs));
        }