partial void UpdateNotification(Notification instance);
partial void DeleteNotification(Notification instance);
partial void InsertNotification(Notification instance);
private void detach_Notifications(Notification entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_Notifications(Notification entity) { this.SendPropertyChanging(); entity.Role = this; }
private static void SaveNotification(Notification nf) { try { nf.modified_by = _defaultUserId; ; nf.updated_at = DateTime.Now; Database.Tracker.SubmitChanges(); } catch (Exception) { throw; } }
private static void AddNotification(int role_id, string notification_type, string job_type, int jobid) { try { Notification n = new Notification(); n.to_role_id = role_id; n.from_user_id = _defaultUserId; n.notification_type = notification_type; n.job_type = job_type; n.job_id = jobid; n.times_sent = 1; n.last_sent = DateTime.Now; n.status = Constants.NF_STATUS_NEW; n.modified_by = _defaultUserId; n.created_at = DateTime.Now; n.updated_at = DateTime.Now; Database.Tracker.Notifications.InsertOnSubmit(n); Database.Tracker.SubmitChanges(); } catch (Exception) { throw; } }