private TableCell createEditTableCell(DataRow dr) { TableCell tcTemp = new TableCell(); tcTemp.Attributes.Add("class", "FlowBg_now");//此处添加的是当前步骤的cell Label lblRegionCaption = new Label(); lblRegionCaption.Text = DBNullConverter.ToStr(dr["RegionCaption"]); lblRegionCaption.ID = "lblRegionCaption"; lblRegionCaption.Attributes.Add("class", "TxtB"); tcTemp.Controls.Add(lblRegionCaption); tcTemp.Controls.Add(new LiteralControl("<br><br>")); Label lblApproverEx = new Label(); if (DBNullConverter.ToInt32(dr["OnError"]) == 1) { lblApproverEx.Text = "操作人:"; } else { lblApproverEx.Text = "审批人:"; } lblApproverEx.Attributes.Add("class", "TxtB"); tcTemp.Controls.Add(lblApproverEx); Label lblApprover = new Label(); lblApprover.ID = "lblApprover"; lblApprover.Text = DBNullConverter.ToStr(dr["Approver"]); tcTemp.Controls.Add(lblApprover); tcTemp.Controls.Add(new LiteralControl("<br><br>")); Label lblrequiredLable = new Label(); lblrequiredLable.Text = "*"; lblrequiredLable.ForeColor = System.Drawing.Color.Red; tcTemp.Controls.Add(lblrequiredLable); Label lblStatus = new Label(); lblStatus.ID = "lblStatus"; lblStatus.Text = "单据状态:" + setHighLight(dr["IsOutTime"].ToString()); lblStatus.Attributes.Add("class", "TxtB"); tcTemp.Controls.Add(lblStatus); tcTemp.Controls.Add(new LiteralControl("<br><br>")); //Dim radApprove As RadioButton = New RadioButton radApprove.ID = "radApprove"; if (DBNullConverter.ToInt32(dr["OnError"]) == 1) { radApprove.Text = "尝试恢复"; } else { radApprove.Text = "同意"; radApprove.CheckedChanged += new EventHandler(radApprove_CheckedChanged); } radApprove.GroupName = "gnStatus"; radApprove.Checked = true; radApprove.AutoPostBack = true; tcTemp.Controls.Add(radApprove); tcTemp.Controls.Add(new LiteralControl("<br><br>")); //Dim radReject As RadioButton = New RadioButton radReject.ID = "radReject"; if (DBNullConverter.ToInt32(dr["OnError"]) == 1) { radReject.Text = "退回单据"; } else { radReject.Text = "拒绝"; radReject.CheckedChanged += new EventHandler(radApprove_CheckedChanged); } radReject.GroupName = "gnStatus"; radReject.AutoPostBack = true; tcTemp.Controls.Add(radReject); tcTemp.Controls.Add(new LiteralControl(" ")); //if (radReject.Checked) //{ // lblRejectReason.Text = "Reject Reason:"; // lblRejectReason.ID = "lblRejectReason"; // lblRejectReason.Attributes.Add("class", "TxtB"); // lblRejectReason.Visible = false; // tcTemp.Controls.Add(lblRejectReason); // tcTemp.Controls.Add(new LiteralControl("<br><br>")); ddlReject.ID = "ddlReject"; ddlReject.Width = new Unit("142px"); ddlReject.Visible = false; ddlReject.DataValueField = "RejectReasonId"; ddlReject.DataTextField = "RejectReasonTitle"; ddlReject.AutoPostBack = true; //RejectReasonBLL bll = new RejectReasonBLL(); if (DBNullConverter.ToInt32(dr["OnError"]) == 1) { tcTemp.Controls.Add(new LiteralControl("<br><br>")); } else { MasterDataBLL bll = new MasterDataBLL(); ddlReject.DataSource = bll.GetRejectReason(); ddlReject.DataBind(); ddlReject.Items.Insert(0, new ListItem("---请您选择---", "")); ddlReject.SelectedIndexChanged += new EventHandler(ddlReject_SelectedIndexChanged); tcTemp.Controls.Add(ddlReject); tcTemp.Controls.Add(new LiteralControl("<br><br>")); Label lblComments = new Label(); lblComments.Text = "审批意见:"; lblComments.ID = "lblComments"; lblComments.Attributes.Add("class", "TxtB"); tcTemp.Controls.Add(lblComments); tcTemp.Controls.Add(new LiteralControl("<br><br>")); } txtComments.ID = "txtComments"; txtComments.Width = 200; txtComments.Height = 50; txtComments.TextMode = TextBoxMode.MultiLine; txtComments.Rows = 5; txtComments.Columns = 20; if (DBNullConverter.ToInt32(dr["OnError"]) == 1) { txtComments.Text = DBNullConverter.ToStr(dr["Comment"]); txtComments.ReadOnly = true; } else { txtComments.Attributes.Add("onchange", "javascript:return textLimit(this,100);"); } //txtComments.Attributes.Add("onKeyUp", "javascript:textLimit(this,100);") tcTemp.Controls.Add(txtComments); return(tcTemp); }