private void PreCheckShiftRequestMemoInfoForCreate(ShiftRequestMemoInfo entityToCreate) { if (entityToCreate == null) { BizExceptionHelper.Throw("ShiftInternalMemo_ItemContentNotBeNull"); //throw new BizException("WarningMessage.ShiftInternalMemo_ItemContentNotBeNullValue"); } if (entityToCreate.Content == null) { BizExceptionHelper.Throw("ShiftInternalMemo_ItemContentNotBeNull"); //throw new BizException("WarningMessage.ShiftInternalMemo_ItemContentNotBeNullValue"); } if (entityToCreate.MemoStatus == ShiftRequestMemoStatus.FollowUp) { if (entityToCreate.RemindTime == null) { BizExceptionHelper.Throw("ShiftInternalMemo_ItemRemindTimeNotBeNull"); //throw new BizException("WarningMessage.ShiftInternalMemo_ItemRemindTimeNotBeNullValue"); } else if (DateTime.Compare(entityToCreate.RemindTime.Value, DateTime.Now.AddHours(1)) < 0) { BizExceptionHelper.Throw("ShiftInternalMemo_ItemRemindTimeShouldBeGreaterThanNowOneHour"); //throw new BizException("WarningMessage.ShiftInternalMemo_ItemRemindTimeShouldBeGreaterThanNowOneHourValue"); } } }
private void PreCheckShiftRequestInfoForUpdate(ShiftRequestMemoInfo entityToUpdate) { if (entityToUpdate == null) { BizExceptionHelper.Throw("ShiftInternalMemo_ItemContentNotBeNull"); //throw new BizException("WarningMessage.ShiftInternalMemo_ItemNoteNotBeNullValue"); } if (entityToUpdate.Note == null) { BizExceptionHelper.Throw("ShiftInternalMemo_ItemContentNotBeNull"); //throw new BizException("WarningMessage.ShiftInternalMemo_ItemNoteNotBeNullValue"); } }