public ResultClass GetChallengeTime(ChallangeIdModel model) { var Result = new ResultClass(); try { ChallangeBinding challangeBinding = new ChallangeBinding(); var data = challangeBinding.GetChallengeTime(model); if (data != null) { Result = new ResultClass() { Data = data, Message = "Data found successfully", Result = true }; } else { Result = new ResultClass() { Data = data, Message = "Data not found", Result = false }; } } catch (Exception ex) { Result = new ResultClass() { Result = false, Message = ex.Message + "---" + ex.StackTrace, Data = null }; } return(Result); }
public ResultClass SetStartingChallengeTime(ChallangeIdModel model) { var Result = new ResultClass(); try { ChallangeBinding challangeBinding = new ChallangeBinding(); var data = challangeBinding.SetStartingChallengeTime(model); if (data != null) { Result = new ResultClass() { Data = data, Message = "Challenge starting time set successfully", Result = true }; } else { Result = new ResultClass() { Message = "Challenge Starting Time not set", Result = false }; } } catch (Exception ex) { Result = new ResultClass() { Result = false, Message = ex.Message + "---" + ex.StackTrace, Data = null }; } return(Result); }
public ResultClass SendChallengeStartNotification(ChallangeIdModel model) { var Result = new ResultClass(); try { ChallangeBinding challangeBinding = new ChallangeBinding(); var data = challangeBinding.SendChallengeStartNotification(model); if (data) { Result = new ResultClass() { Data = null, Message = "Message send successfully", Result = true }; } else { Result = new ResultClass() { Message = "Message not send", Result = false }; } } catch (Exception ex) { Result = new ResultClass() { Result = false, Message = ex.Message + "---" + ex.StackTrace, Data = null }; } return(Result); }
public ResultClass SetWinnerUser(ChallangeIdModel model) { var Result = new ResultClass(); try { ChallangeBinding challangeBinding = new ChallangeBinding(); var data = challangeBinding.SetWinnerUser(model); if (data != null) { Result = new ResultClass() { Data = data, Message = "Data deleted successfully", Result = true }; } else { Result = new ResultClass() { Message = "Data not deleted", Result = false }; } } catch (Exception ex) { Result = new ResultClass() { Result = false, Message = ex.Message + "---" + ex.StackTrace, Data = null }; } return(Result); }