public ActionResult Update(UserLoginItemModel userLoginItemModel)
        {
            try
            {
                if (IsUpdate(userLoginItemModel.OperationResult))
                {
                    if (IsValid(userLoginItemModel.OperationResult, userLoginItemModel.UserLogin))
                    {
                        UserLogin userLogin = (UserLogin)userLoginItemModel.UserLogin.ToData();
                        if (Application.Update(userLoginItemModel.OperationResult, userLogin))
                        {
                            if (userLoginItemModel.IsSave)
                            {
                                return(JsonResultSuccess(userLoginItemModel.OperationResult,
                                                         Url.Action("Update", "UserLogin", new { LoginProvider = userLogin.LoginProvider, ProviderKey = userLogin.ProviderKey, UserId = userLogin.UserId }, Request.Url.Scheme)));
                            }
                            else
                            {
                                return(JsonResultSuccess(userLoginItemModel.OperationResult));
                            }
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                userLoginItemModel.OperationResult.ParseException(exception);
            }

            userLoginItemModel.ActivityOperations = ActivityOperations;

            return(JsonResultOperationResult(userLoginItemModel.OperationResult));
        }
        public ActionResult Create(string masterEntity = null, string masterKey = null)
        {
            UserLoginItemModel userLoginItemModel = new UserLoginItemModel(ActivityOperations, "Create", masterEntity, masterKey);

            try
            {
                if (IsCreate(userLoginItemModel.OperationResult))
                {
                    return(ZPartialView("CRUD", userLoginItemModel));
                }
            }
            catch (Exception exception)
            {
                userLoginItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(userLoginItemModel.OperationResult));
        }
        public ActionResult Delete(UserLoginItemModel userLoginItemModel)
        {
            try
            {
                if (IsDelete(userLoginItemModel.OperationResult))
                {
                    if (Application.Delete(userLoginItemModel.OperationResult, (UserLogin)userLoginItemModel.UserLogin.ToData()))
                    {
                        return(JsonResultSuccess(userLoginItemModel.OperationResult));
                    }
                }
            }
            catch (Exception exception)
            {
                userLoginItemModel.OperationResult.ParseException(exception);
            }

            userLoginItemModel.ActivityOperations = ActivityOperations;

            return(JsonResultOperationResult(userLoginItemModel.OperationResult));
        }
        public ActionResult Delete(string loginProvider, string providerKey, string userId, string masterEntity = null, string masterKey = null)
        {
            UserLoginItemModel userLoginItemModel = new UserLoginItemModel(ActivityOperations, "Delete", masterEntity, masterKey);

            try
            {
                if (IsDelete(userLoginItemModel.OperationResult))
                {
                    UserLogin userLogin = Application.GetById(userLoginItemModel.OperationResult, new object[] { loginProvider, providerKey, userId });
                    if (userLogin != null)
                    {
                        userLoginItemModel.UserLogin = new UserLoginViewModel(userLogin);

                        return(ZPartialView("CRUD", userLoginItemModel));
                    }
                }
            }
            catch (Exception exception)
            {
                userLoginItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(userLoginItemModel.OperationResult));
        }