// //////////////////////////////////////////////////////////////////////// // PUBLIC METHODS // /// <summary> /// LoadAndAddItem /// </summary> /// <param name="workFunctionConcat">Work Function concat</param> /// <returns></returns> public DataSet LoadAndAddItem(string workFunctionConcat) { // Add item CreateTableStructure(); Insert(workFunctionConcat); // Load type of work - string function TeamProjectTimeWorkFunctionConcatGateway teamProjectTimeWorkFunctionGateway = new TeamProjectTimeWorkFunctionConcatGateway(Data); teamProjectTimeWorkFunctionGateway.ClearBeforeFill = false; teamProjectTimeWorkFunctionGateway.LoadWorkFunctionConcat(); teamProjectTimeWorkFunctionGateway.ClearBeforeFill = true; return Data; }
//protected void btnUnassociate_Click(object sender, EventArgs e) //{ // Project project = new Project(projectTDS); // project.UpdateLibraryCategoriesId(int.Parse(hdfProjectId.Value), null); // UpdateDatabase(); // ViewState["update"] = "yes"; // btnUnassociate.Visible = false; // btnAssociate.Visible = false; // string url = "./project_edit.aspx?source_page=lm&project_id=" + hdfProjectId.Value + GetNavigatorState() + "&origin=summary&update=" + ViewState["update"] + "&data_changed=" + hdfDataChanged.Value; // Response.Redirect(url); //} protected void cbxFairWageApplies_CheckedChanged(object sender, EventArgs e) { if (cbxFairWageApplies.Checked) { Session["fairWage"] = "True"; int companyId = Int32.Parse(hdfCompanyId.Value); int projectId = Int32.Parse(hdfProjectId.Value); TeamProjectTimeWorkFunctionConcatGateway teamProjectTimeWorkFunctionGateway = new TeamProjectTimeWorkFunctionConcatGateway(); teamProjectTimeWorkFunctionGateway.LoadWorkFunctionConcat(); foreach (TeamProjectTime2TDS.TEAM_PROJECT_TIME_WORK_FUNCTION_CONCATRow originalRow in (TeamProjectTime2TDS.TEAM_PROJECT_TIME_WORK_FUNCTION_CONCATDataTable)teamProjectTimeWorkFunctionGateway.Table) { string workFunctionConcat = originalRow.WorkFunctionConcat; string[] workFunction = workFunctionConcat.ToString().Trim().Split('.'); string work_ = workFunction[0].Trim(); string function_ = workFunction[1].Trim(); ProjectNavigatorProjectWorkFunctionFairWage model = new ProjectNavigatorProjectWorkFunctionFairWage(projectNavigatorTDS); if (!model.ExistWorkFunction(work_, function_)) { TypeOfWorkFunctionClassificationAdd(companyId, projectId, true, workFunctionConcat, work_, function_); } } } else { Session["fairWage"] = "False"; } }