コード例 #1
0
        /// <summary>
        /// Approves a review.
        /// </summary>
        /// <param name="reviewId">Review id.</param>
        /// <returns>Returns an insteance of <see cref="SubmitResponse"/>
        /// class that represents the submit reponse.</returns>
        public async Task <SubmitResponse> ApproveReview(string reviewId)
        {
            var result = await sqlDataProvider.ExecuteScalarAsync <int>("dbo.[ApproveReview]", true,
                                                                        new System.Data.SqlClient.SqlParameter("@reviewId", reviewId));

            return(result == 0 ? SubmitResponse.Ok() : SubmitResponse.Error());
        }
コード例 #2
0
        /// <summary>
        /// Updates a new UserActivation
        /// </summary>
        /// class that represents the information of <see cref="SubmitResponse">.</returns>
        public async Task <SubmitResponse> UpdateUserActivation(UserActivation userActivation)
        {
            var result = await sqlDataProvider.ExecuteScalarAsync <int>("dbo.[UpdateUserActivation]", true,
                                                                        new System.Data.SqlClient.SqlParameter("@Id", userActivation.Id),
                                                                        new System.Data.SqlClient.SqlParameter("@Expires", userActivation.Expires));

            return(result == 0 ? SubmitResponse.Ok() : SubmitResponse.Error());
        }
コード例 #3
0
        /// <summary>
        /// Creates a new contact us ticket.
        /// </summary>
        /// <param name="info">Ticket information.</param>
        /// <returns>Returns an insteance of <see cref="SubmitResponse"/>
        /// class that represents the submit reponse.</returns>
        public async Task <SubmitResponse> CreateContactUsTicket(CreateContactUsTicketInfo info)
        {
            var result = await sqlDataProvider.ExecuteScalarAsync <int>("dbo.[AddContactUsTicket]", true,
                                                                        new System.Data.SqlClient.SqlParameter("@name", info.Name),
                                                                        new System.Data.SqlClient.SqlParameter("@phoneNumber", info.PhoneNumber),
                                                                        new System.Data.SqlClient.SqlParameter("@email", info.Email),
                                                                        new System.Data.SqlClient.SqlParameter("@description", info.Description));

            return(result == 0 ? SubmitResponse.Ok() : SubmitResponse.Error());
        }
コード例 #4
0
        /// <summary>
        /// Creates a new review.
        /// </summary>
        /// <param name="info">Review information.</param>
        /// <returns>Returns an insteance of <see cref="SubmitResponse"/>
        /// class that represents the submit reponse.</returns>
        public async Task <SubmitResponse> CreateReview(CreateReviewInfo info)
        {
            var result = await sqlDataProvider.ExecuteScalarAsync <int>("dbo.[AddOrUpdateReview]", true,
                                                                        new System.Data.SqlClient.SqlParameter("@doctorId", info.DoctorId),
                                                                        new System.Data.SqlClient.SqlParameter("@reviewerName", info.ReviewerName),
                                                                        new System.Data.SqlClient.SqlParameter("@description", info.Description),
                                                                        new System.Data.SqlClient.SqlParameter("@rank", info.Rank),
                                                                        new System.Data.SqlClient.SqlParameter("@userId", info.UserId));

            return(result == 0 ? SubmitResponse.Ok() : SubmitResponse.Error());
        }
コード例 #5
0
        /// <summary>
        /// Creates a new UserActivation
        /// </summary>
        /// class that represents the information of <see cref="SubmitResponse">.</returns>
        public async Task <SubmitResponse> AddUserActivation(UserActivation userActivation)
        {
            var result = await sqlDataProvider.ExecuteScalarAsync <int>("dbo.[AddUserActivation]", true,
                                                                        new System.Data.SqlClient.SqlParameter("@Id", userActivation.Id),
                                                                        new System.Data.SqlClient.SqlParameter("@ShortCode", userActivation.ShortCode),
                                                                        new System.Data.SqlClient.SqlParameter("@IdentityCode", userActivation.IdentityCode),
                                                                        new System.Data.SqlClient.SqlParameter("@Created", userActivation.Created),
                                                                        new System.Data.SqlClient.SqlParameter("@Expires", userActivation.Expires),
                                                                        new System.Data.SqlClient.SqlParameter("@UserId", userActivation.UserId));

            return(result == 0 ? SubmitResponse.Ok() : SubmitResponse.Error());
        }