/// <summary> /// 当为编辑状态(edit)时绑定数据 /// </summary> private void BindData() { ProcessRuleBLL bll = new ProcessRuleBLL(); ProcessNodeInfo pn = bll.GetProcessNodeByNodeID(NodeID); if (pn != null) { txtNodeName.Text = pn.NodeName; //cbMeet.Checked = pn.IsAllowMeet; //cbEndorsement.Checked = pn.IsAllowEndorsement; //cbIsAllowSpecialApproval.Checked = pn.IsAllowSpecialApproval; //txtApproveRule.Text = pn.ApproveRule.ToString(); //txtDeclineRule.Text = pn.DeclineRule.ToString(); txtURL.Text = pn.URL; txtNotification.Text = pn.Notification; txtOrderNo.Text = pn.OrderNo.ToString(); if (pn.WayBackNodeID != Guid.Empty) { foreach (ListItem li in ddlWayBack.Items) { if (li.Value.Equals(pn.WayBackNodeID.ToString(), StringComparison.OrdinalIgnoreCase)) { li.Selected = true; break; } } } //绑定加权方式 foreach (ListItem li in ddlWeighted.Items) { if (li.Value.Equals(pn.WeightedType, StringComparison.OrdinalIgnoreCase)) { li.Selected = true; break; } } txtSamplingRate.Text = pn.SamplingRate; if (pn.DepartCode != "") { ListItem listItem = new ListItem(pn.DepartName, pn.DepartCode); ddlDept.Items.Add(listItem); } //所属部门 //foreach (ListItem li in ddlDept.Items) //{ // if (li.Value.Equals(pn.DepartCode, StringComparison.OrdinalIgnoreCase)) // { // li.Selected = true; // break; // } //} } }