Exemple #1
0
 private void InitialData(string accountid, string applianceid)
 {
     listAccountAppliance       = _accountApplianceService.GetApplianceByAccountId(Convert.ToInt64(accountid));
     listTimerSchedule          = _timerScheduleService.GetTimerScheduleDTOByApplianceId(Convert.ToInt64(applianceid));
     ListAccount                = _accountApplianceService.GetAccountByApplianceId(Convert.ToInt64(applianceid), true);
     listStates                 = _stateService.GetAllState();
     listNotificationPreference = _notificationPreferenceService.GetNotificationPreferenceByApplianceId(Convert.ToInt64(applianceid));
 }
Exemple #2
0
 public ResponseData <User> Index(string applianceId, string accountId)
 {
     try
     {
         var lAppliance = _accountApplianceService.GetApplianceByAccountId(Convert.ToInt64(accountId));
         var lAccount   = _accountApplianceService.GetAccountByApplianceId(Convert.ToInt64(applianceId), null);
         var response   = new ResponseData <User>();
         var user       = new User()
         {
             lAccountDTO = lAccount,
             lAppliance  = lAppliance
         };
         response.Data    = user;
         response.Message = ResponseMessage.Success;
         response.Status  = ResponseStatus.Success.ToString();
         return(response);
     }
     catch (Exception ex)
     {
         var response = new ResponseData <User>();
         response.Message = ex.Message;
         response.Status  = ResponseStatus.Error.ToString();
         return(response);
     }
 }