partial void DeleteT_ActivityType(T_ActivityType instance);
 partial void InsertT_ActivityType(T_ActivityType instance);
 partial void UpdateT_ActivityType(T_ActivityType instance);
Пример #4
0
		public string GetActivityType(int id)
		{
			var activity = new T_Activity();
			var actType = new T_ActivityType();
			using (var dc = new EngageCCTDataClassesDataContext())
			{
				activity = dc.T_Activities.Where(a => a.ActivityID == id).FirstOrDefault();
				try
				{
					actType = dc.T_ActivityTypes.Where(a => a.TypeID == activity.TypeID).FirstOrDefault();
				}
				catch (NullReferenceException e)
				{
					var exc = new Exception("No such activity in DB", e);
					throw exc;
				}
			}
			if (actType == null)
			{
				var exc = new Exception("No such activity type in DB");
				throw exc;
			}
			return actType.atType;
		}