public int TaskRelationIns(TaskRelation task) { string str = ""; object obj2 = str + "insert into EPM_Task_TaskRelation (ProjectCode,BeginTaskCode,EndTaskCode,Relationship,WaitDay)values"; return(publicDbOpClass.ExecSqlString(string.Concat(new object[] { obj2, "('", task.ProjectCode, "','", task.BeginTaskCode, "','", task.EndTaskCode, "',", task.Relationship, ",", task.WaitDay, ")" }))); }
private void DGrdMarket_ItemDataBound(object sender, DataGridItemEventArgs e) { switch (e.Item.ItemType) { case ListItemType.Item: case ListItemType.AlternatingItem: { TaskRelation taskRelation = (TaskRelation)e.Item.DataItem; e.Item.Attributes["onmouseover"] = "doMouseOver(this);"; e.Item.Attributes["onmouseout"] = "doMouseOut(this);"; e.Item.Attributes["onclick"] = string.Concat(new object[] { "doClick(this,'", this.DGrdMarket.ClientID, "');clickTenderRow('", e.Item.ItemIndex, "');" }); try { ((Label)e.Item.Cells[2].FindControl("LblTaskName")).Text = this.ScheduleAct.GetTaskName(this.ProjectCode, taskRelation.BeginTaskCode); switch (taskRelation.Relationship) { case 0: ((Label)e.Item.Cells[0].FindControl("LblRelation")).Text = "完成完成[FF]"; break; case 1: ((Label)e.Item.Cells[0].FindControl("LblRelation")).Text = "完成开始[FS]"; break; case 2: ((Label)e.Item.Cells[0].FindControl("LblRelation")).Text = "开始完成[SF]"; break; case 3: ((Label)e.Item.Cells[0].FindControl("LblRelation")).Text = "开始开始[SS]"; break; } return; } catch { return; } break; } case ListItemType.SelectedItem: return; case ListItemType.EditItem: break; default: return; } TaskRelation taskRelation2 = (TaskRelation)e.Item.DataItem; e.Item.Attributes["onmouseover"] = "doMouseOver(this);"; e.Item.Attributes["onmouseout"] = "doMouseOut(this);"; e.Item.Attributes["onclick"] = string.Concat(new object[] { "doClick(this,'", this.DGrdMarket.ClientID, "');clickTenderRow('", e.Item.ItemIndex, "');" }); DropDownList dropDownList = (DropDownList)e.Item.Cells[0].FindControl("DDLRelation"); try { if (dropDownList.Items.Count > 0) { dropDownList.SelectedValue = taskRelation2.Relationship.ToString(); } ((TextBox)e.Item.Cells[2].FindControl("TxtTaskName")).Text = this.ScheduleAct.GetTaskName(this.ProjectCode, taskRelation2.BeginTaskCode); } catch { } }