/// <summary> /// Delete TeamProjectTimeDetailTemp /// </summary> /// <param name="teamProjectTimeId">teamProjectTimeId</param> /// <param name="detailId">detailId</param> public void Delete(int teamProjectTimeId, int detailId) { TeamProjectTime2TDS.LFS_TEAM_PROJECT_TIME_DETAIL_TEMPRow teamProjectTimeDetailRow = GetRow(teamProjectTimeId, detailId); teamProjectTimeDetailRow.Deleted = true; // Delete real detail TeamProjectTime2Detail teamProjectTime2Detail = new TeamProjectTime2Detail(Data); teamProjectTime2Detail.Delete(teamProjectTimeId, detailId); }
private void DeleteTemplate(int teamProjectTimeId) { // Create TDS to save teamProjectTime2TDSToSave = new TeamProjectTime2TDS(); // Delete Template TeamProjectTime2Template teamProjectTime2Template = new TeamProjectTime2Template(teamProjectTime2TDS); teamProjectTime2Template.Delete(teamProjectTimeId); // ... Store datasets for teplate Session.Remove("templateDummy"); Session["teamProjectTime2TDS"] = teamProjectTime2TDS; template = teamProjectTime2TDS.Template; Session["template"] = teamProjectTime2TDS.Template; // Delete associated TeamProjectTime to Template // ... load TeamProjectTime TeamProjectTime2Gateway teamProjectTime2Gateway = new TeamProjectTime2Gateway(teamProjectTime2TDSToSave); teamProjectTime2Gateway.LoadByTeamProjectTimeId(teamProjectTimeId); // ... delete TeamProjectTime TeamProjectTime2 teamProjectTime2 = new TeamProjectTime2(teamProjectTime2TDSToSave); teamProjectTime2.Delete(teamProjectTimeId); // Delete associated TeamProjectTimeDetails to Template // ... load TeamProjectTimeDetails TeamProjectTime2DetailGateway teamProjectTime2DetailGateway = new TeamProjectTime2DetailGateway(teamProjectTime2TDSToSave); teamProjectTime2DetailGateway.LoadByTeamProjectTimeId(teamProjectTimeId); // ... delete TeamProjectTimeDetails TeamProjectTime2Detail teamProjectTime2Detail = new TeamProjectTime2Detail(teamProjectTime2TDSToSave); teamProjectTime2Detail.Delete(teamProjectTimeId); }