コード例 #1
0
		private void detach_T_NotificationTypes(T_NotificationType entity)
		{
			this.SendPropertyChanging();
			entity.T_EmailTemplate = null;
		}
コード例 #2
0
 partial void DeleteT_NotificationType(T_NotificationType instance);
コード例 #3
0
 partial void InsertT_NotificationType(T_NotificationType instance);
コード例 #4
0
 partial void UpdateT_NotificationType(T_NotificationType instance);
コード例 #5
0
ファイル: CCTLeadProvider.cs プロジェクト: evkap/EngageCCT
		public string GetEmailTemplate(int notificationTypeId)
		{
			var template = new T_NotificationType();
			var emailTemplate = new T_EmailTemplate();
			using (var dc = new EngageCCTDataClassesDataContext())
			{
				template = dc.T_NotificationTypes.Where(n => n.TypeID == notificationTypeId).FirstOrDefault();
				try
				{
					emailTemplate = dc.T_EmailTemplates.Where(a => a.TemplateID == template.ntAssociatedTemplateID).FirstOrDefault();
				}
				catch (NullReferenceException e)
				{
					var exc = new Exception("No such notification type in DB", e);
					throw exc;
				}
			}
			if (emailTemplate == null)
			{
				var exc = new Exception("No such email template in DB");
				throw exc;
			}
			return emailTemplate.tmpText;
		}