public async Task <ApiResponse> UpdateFiles(LoginVM objLoginModel) { ApiResponse apiResponse = new ApiResponse(); LoginRepo _loginRepo = new LoginRepo(); try { UserDetail objUserDetail = await _loginRepo.UserLogin(objLoginModel); if (objUserDetail.UserID > 0) { apiResponse = TaskUTL.GenerateApiResponse(true, 1, "login succeessfully", objUserDetail); } else { apiResponse = TaskUTL.GenerateApiResponse(false, 0, "Login failed. Please check your UserName and/or Password.", null); } return(apiResponse); } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(apiResponse); } }
public async Task <ApiResponse> Chat_Sent(ChatVM _vm) { ApiResponse apiResponse = new ApiResponse(); ChatRepo _obj = new ChatRepo(); try { _vm._flag = 0; var result = await _obj.ChatMessageSend(_vm); if (result > 0) { return new ApiResponse { IsValidUser = true, Message = "success", MessageType = result, DataList = result } } ; else { return new ApiResponse { IsValidUser = true, Message = "someting went wrong..!!", MessageType = result, DataList = result } }; } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, "hub", true); return(apiResponse); } }
public async Task <ApiResponse> ValidateOtp(OtpValidationVM _vm) { ApiResponse apiResponse = new ApiResponse(); OtpRepo _repo = new OtpRepo(); try { var result = await _repo.CheckOTP(_vm); if (result._flag == 1) { return(new ApiResponse { IsValidUser = true, DataList = result._dataList, Message = "success", MessageType = result._flag }); } else if (result._flag == 2) { return(new ApiResponse { IsValidUser = true, Message = "InValid OTP", MessageType = result._flag }); } else { return(new ApiResponse { IsValidUser = true, Message = "Somthing went Wrong..!!", MessageType = result._flag }); } } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(apiResponse); } }
public async Task <ApiResponse> ChatSignOut(ChatVM _vm) { ApiResponse apiResponse = new ApiResponse(); ChatRepo _obj = new ChatRepo(); try { _vm._flag = 0; var result = await _obj.ChatSignOut(_vm); if (result > 0) { return new ApiResponse { IsValidUser = true, Message = "success", MessageType = result, DataList = null } } ; else { return new ApiResponse { IsValidUser = true, Message = "Already Chat Off", MessageType = result, DataList = null } }; } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(apiResponse); } }
public async Task <HttpResponseMessage> CheckUpdateDownload(UserUpdateCheck obj) { ApiResponse apiResponse = new ApiResponse(); LoginRepo _loginRepo = new LoginRepo(); try { HttpResponseMessage objUserUpdate = await _loginRepo.CheckUpdateDownload(obj); return(objUserUpdate); } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(null); } }
public async Task <ApiResponse> GetOnlineUserListByOperatorID(UserVM _vmUser) { ApiResponse apiResponse = new ApiResponse(); UserRepo _user = new UserRepo(); try { var result = await _user.GetUserList(_vmUser.OperatorID); return(new ApiResponse { IsValidUser = true, Message = string.Empty, MessageType = 1, DataList = result }); } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(apiResponse); } }
//public async Task<ApiResponse> CreateUpdate(UserRegistrationVM _vmEmployee) public async Task <IHttpActionResult> CreateUpdate(UserRegistrationVM _vmEmployee) { ApiResponse apiResponse = new ApiResponse(); _IuserRegistration = new UserRegisterRepo(); try { //Int32 Result = await _IuserRegistration.CreateUpdate(_vmEmployee); //return new ApiResponse { IsValidUser = true, Message = string.Empty, MessageType = Result }; IHttpActionResult objResult = await _IuserRegistration.CreateUpdate(_vmEmployee); return(objResult); } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(null); } }
public async Task <ApiResponse> GetNewOTP(NewOtpVM _vmNewOtp) { ApiResponse apiResponse = new ApiResponse(); _INewOTP = new NewOtpRepo(); try { var result = await _INewOTP.GetNewOTP(_vmNewOtp); return(new ApiResponse { IsValidUser = true, Message = string.Empty, MessageType = 1, DataList = result }); } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(apiResponse); } }
public async Task <ApiResponse> CreateUpdate(OperatorRegistrationVM _vmOperatorRegistration) { ApiResponse apiResponse = new ApiResponse(); _IOperatorRegistration = new OperatorRegisterRepo(); try { Int32 Result = await _IOperatorRegistration.CreateUpdate(_vmOperatorRegistration); return(new ApiResponse { IsValidUser = true, Message = string.Empty, MessageType = Result }); } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); return(apiResponse); } }
public async Task <ApiResponse> CheckUpdate(UserUpdateCheck obj) { LoginRepo loginRepo = new LoginRepo(); ApiResponse apiResponse = new ApiResponse(); try { UserUpdateRespCheck objCheckUpdate = await loginRepo.CheckUpdate(obj); if (objCheckUpdate.IsValidUser) { apiResponse = TaskUTL.CheckUpdate(objCheckUpdate.IsValidUser, objCheckUpdate.IsUpdateAvailable, obj.Token, objCheckUpdate); } } catch (Exception ex) { apiResponse = TaskUTL.GenerateExceptionResponse(ex, _pageName, true); } return(apiResponse); }