public void Delete(modelProjectVariationOrganization projectVariationOrg, bool reload = true) { db3.Delete("tblProjectVariationOrganization", "ID", projectVariationOrg); if (reload) { LoadProjectVariationOrganizations(); } }
public void Update(modelProjectVariationOrganization projectVariationOrg, bool reload = true) { if (projectVariationOrg.CreatedDate.Year < 2000) { projectVariationOrg.CreatedDate = new DateTime(2000, 1, 1); } projectVariationOrg.UpdatedDate = DateTime.Now; db3.Update("tblProjectVariationOrganization", "ID", projectVariationOrg); if (reload) { LoadProjectVariationOrganizations(); } }
public void Insert(modelProjectVariationOrganization projectVariationOrg, bool reload = true) { if (projectVariationOrg.ID == 0) { projectVariationOrg.ID = Program.GData.LongID(); projectVariationOrg.CreatedDate = DateTime.Now; projectVariationOrg.UpdatedDate = DateTime.Now; } db3.Insert("tblProjectVariationOrganization", "ID", false, projectVariationOrg); if (reload) { LoadProjectVariationOrganizations(); } }