public void Should_UpdateNotificationOperationCode() { NotificationOperationCode notificationOperationCode = new NotificationOperationCode(OpCode, arName, enName, panelAr, panelEn, emailAr, emailEn, smsAr, smsEn, catId, roleId); notificationOperationCode.UpdateNotificationOperationCode(OpCode, arName, enName, panelAr, panelEn, emailAr, emailEn, smsAr, smsEn, catId, roleId); notificationOperationCode.ShouldNotBeNull(); }
public NotificationOperationCode GetNotificationOperationCodeData() { NotificationOperationCode notificationOperation = new NotificationOperationCode("OpCode", "arName", "enName", "panelAr", "panelEn", "emailAr", "emailEn", "smsAr", "smsEn", 1, 1); notificationOperation.setNotificationOperationCodeIdForTest(); return(notificationOperation); }
public async Task <NotificationOperationCode> AddNotificationOperationCode(NotificationOperationCode notificationOperationCode) { Check.ArgumentNotNull(nameof(notificationOperationCode), notificationOperationCode); _context.NotificationOperationCodes.Add(notificationOperationCode); await _context.SaveChangesAsync(); return(notificationOperationCode); }
public List <NotificationOperationCode> GetNotificationOperationCode() { List <NotificationOperationCode> notificationOperationCodes = new List <NotificationOperationCode>(); NotificationOperationCode notificationOperation = new NotificationOperationCode("OpCode", "arName", "enName", "panelAr", "panelEn", "emailAr", "emailEn", "smsAr", "smsEn", 1, 1); notificationOperation.setNotificationOperationCodeIdForTest(); notificationOperationCodes.Add(notificationOperation); return(notificationOperationCodes); }
public void Should_Construct_NotificationOperationCode() { NotificationOperationCode notificationOperationCode = new NotificationOperationCode(OpCode, arName, enName, panelAr, panelEn, emailAr, emailEn, smsAr, smsEn, catId, roleId); _ = new NotificationOperationCode(); _ = notificationOperationCode.NotificationOperationCodeId; _ = notificationOperationCode.UserRole; _ = notificationOperationCode.EmailSubjectTemplateAr; _ = notificationOperationCode.EmailSubjectTemplateEn; _ = notificationOperationCode.NotificationCategory; notificationOperationCode.ShouldNotBeNull(); }
public async Task SaveOperationCode(OperationCodeViewModel operationCode) { int Id = string.IsNullOrEmpty(operationCode.IdString) ? 0 : Util.Decrypt(operationCode.IdString); if (Id == 0) { var op = new NotificationOperationCode(operationCode.OperationCode, operationCode.ArabicName, operationCode.EnglishName, operationCode.PanelTemplateAr, operationCode.PanelTemplateEn, operationCode.EmailBodyTemplateAr, operationCode.EmailBodyTemplateEn, operationCode.SmsTemplateAr, operationCode.SmsTemplateEn, operationCode.NotificationCategoryId, operationCode.UserRoleId); await _notifayCommands.AddNotificationOperationCode(op); } else { var opCode = await _iNotificationQuerie.FindNotificationOperationCode(Util.Decrypt(operationCode.IdString)); opCode.UpdateNotificationOperationCode(operationCode.OperationCode, operationCode.ArabicName, operationCode.EnglishName, operationCode.PanelTemplateAr, operationCode.PanelTemplateEn, operationCode.EmailBodyTemplateAr, operationCode.EmailBodyTemplateEn, operationCode.SmsTemplateAr, operationCode.SmsTemplateEn, operationCode.NotificationCategoryId, operationCode.UserRoleId); await _notifayCommands.UpdateNotificationOperationCode(opCode); } await _notifayCommands.SaveChangesAsync(); }