コード例 #1
0
 public IHttpActionResult DeleteUser(string ID)
 {
     try
     {
         bool isDeleted = BLUsers.DeleteUser(ID);
         if (isDeleted)
         {
             return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.OK, "user Deleted successfully")));
         }
         return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Failed to delete user")));
     }
     catch
     {
         return(InternalServerError());
     }
 }
コード例 #2
0
 /// <summary>
 /// This method is used for Delete Uers
 /// </summary>
 /// <param name="UserId"></param>
 /// <returns></returns>
 public string DeleteUers(string UserId)
 {
     objBLUsers = new BLUsers();
     objDataOperationResponse = objBLUsers.DeleteUser(Convert.ToInt32(UserId));
     return(objDataOperationResponse.Message);
 }