public void Write(modelProjectActivity projactivity, bool reload = true) { db4.Update("tblProjectActivity", "ID", projactivity); if (reload) { LoadProjectActivities(); } }
public void Update(modelProjectActivity projactivity, bool reload = true) { if (projactivity.CreatedDate.Year < 2000) { projactivity.CreatedDate = new DateTime(2000, 1, 1); } projactivity.UpdatedDate = DateTime.Now; db4.Update("tblProjectActivity", "ID", projactivity); if (reload) { LoadProjectActivities(); } }
public void Insert(modelProjectActivity projactivity, bool reload = true) { if (projactivity.ID == 0) { projactivity.ID = Program.GData.LongID(); projactivity.CreatedDate = DateTime.Now; projactivity.UpdatedDate = DateTime.Now; } db4.Insert("tblProjectActivity", "ID", false, projactivity); if (reload) { LoadProjectActivities(); } }