private lifesense.Model.t_sleepinfo getSleepInfoModel(SleepData sleepData, lifesense.Model.t_userinfo mUserInfoModel) { lifesense.Model.t_sleepinfo sleepModel = new lifesense.Model.t_sleepinfo(); sleepModel.UserID = mUserInfoModel.UserID; sleepModel.LongSleepNum = sleepData.sleep.depthTime; sleepModel.SleepingTime = TimeParser.GetTime(sleepData.sleep.startTime.ToString()); sleepModel.ShallowSleepNum = sleepData.sleep.shallowTime; sleepModel.WakeUpLong = sleepData.sleep.consciousTime; sleepModel.WakingTime = Convert.ToDateTime(sleepModel.SleepingTime).AddMinutes(sleepData.sleep.totalTime - sleepData.sleep.consciousTime); return(sleepModel); }