public int Save(JobML Job) { try { if (Job.Id == 0) { return(JobDAL.Save(Job)); } else { return(JobDAL.Update(Job)); } } catch (Exception ex) { throw new Exception(String.Format("{0}.Save: {1}", core, ex)); } }
public static void Update() { Job job = new Job(1, " Manufacturing", "Tyres", DateTime.Now, "DL23-TH-4573", 600, 4, 4); JobDAL.Update(job); }