Example #1
0
        public async Task <OperationStatus> ManageIdentity(IdentiyActionBind identiyActionBind, string userName)
        {
            List <SQLParam> sQLParam = new List <SQLParam>
            {
                new SQLParam("@PageActionID", identiyActionBind.PageAction.PageActionID),
                new SQLParam("@SelectedIdentity", identiyActionBind.PageAction.SelectedIdentity),
                new SQLParam("@UserName", userName)
            };

            try
            {
                SQLExecuteNonQueryAsync handler = new SQLExecuteNonQueryAsync();
                int result = await handler.ExecuteNonQueryAsync("[usp_PageAction_ManageIdentity]", sQLParam, "@Status");

                if (result == 1)
                {
                    return(new OperationStatus {
                        Message = "Identy scope added successfully.", StatusCode = StatusCode.Created, Result = result
                    });
                }
                return(new OperationStatus {
                    Message = "Something went wrong while Action deleted.", StatusCode = StatusCode.ServerError, Result = result
                });
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public async Task <OperationStatus> ManageIdentity(IdentiyActionBind identiyActionBind, string userName)
        {
            PageActionDataProvider provider = new PageActionDataProvider();

            return(await provider.ManageIdentity(identiyActionBind, userName));
        }