///<summary></summary> public static long Insert(JobNotification jobNotification) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { jobNotification.JobNotificationNum = Meth.GetLong(MethodBase.GetCurrentMethod(), jobNotification); return(jobNotification.JobNotificationNum); } return(Crud.JobNotificationCrud.Insert(jobNotification)); }
///<summary></summary> public static void Update(JobNotification jobNotification) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), jobNotification); return; } Crud.JobNotificationCrud.Update(jobNotification); }
public override bool Equals(object obj) { JobNotification notif = obj as JobNotification; if (notif == null) { return(false); } return(this.JobNotificationNum == notif.JobNotificationNum && this.JobNum == notif.JobNum && this.UserNum == notif.UserNum && this.Changes == notif.Changes); }
public static long UpsertNotification(long jobNum, long userNum, JobNotificationChanges changes) { //No need for remoting call here. JobNotification notification = GetForJobAndUser(jobNum, userNum); if (notification == null) { notification = new JobNotification(); notification.JobNum = jobNum; notification.UserNum = userNum; notification.Changes = changes; return(Insert(notification)); } else { notification.Changes = notification.Changes | changes; Update(notification); return(notification.JobNotificationNum); } }