/// <summary> /// 校验会签按钮 /// </summary> private void CheckSignBtn() { FSButton btnQualitySubmit = this.Parent.Parent.FindControl("btnQGApprove") as FSButton; FSButton btnDeptSign = this.Parent.Parent.FindControl("btnDeptSign2") as FSButton; FSButton btnLeaderSign = this.Parent.Parent.FindControl("btnLeaderSign2") as FSButton; HiddenField hfDeptSignCount = this.Parent.Parent.FindControl("hfDeptSignCount") as HiddenField; HiddenField hfLeaderSignCount = this.Parent.Parent.FindControl("hfLeaderSignCount") as HiddenField; if (btnLeaderSign != null) { if (PlaceHolder1.Controls.Count >= 1) { btnLeaderSign.Visible = true; } else if (hfDeptSignCount.Value != "0") { btnLeaderSign.Visible = false; btnDeptSign.Visible = true; } else { btnLeaderSign.Visible = false; btnQualitySubmit.Visible = true; } // btnApprove.Visible = true; } if (hfLeaderSignCount != null) { hfLeaderSignCount.Value = PlaceHolder1.Controls.Count.ToString(); } }
/// <summary> /// 校验会签按钮 /// </summary> private void CheckSignBtn() { FSButton btnDeptSign = this.Parent.Parent.FindControl("btnDeptSign") as FSButton; FSButton btnLeaderSign = this.Parent.Parent.FindControl("btnLeaderSign") as FSButton; FSButton btnDeptSign2 = this.Parent.Parent.FindControl("btnDeptSign2") as FSButton; FSButton btnLeaderSign2 = this.Parent.Parent.FindControl("btnLeaderSign2") as FSButton; //FSButton btnApprove = this.Parent.Parent.FindControl("btnApprove") as FSButton; FSButton btnQualitySubmit = this.Parent.Parent.FindControl("btnQGApprove") as FSButton; HiddenField hfDeptSignCount = this.Parent.Parent.FindControl("hfDeptSignCount") as HiddenField; HiddenField hfLeaderSignCount = this.Parent.Parent.FindControl("hfLeaderSignCount") as HiddenField; if (btnDeptSign != null) { int iUseCount = 0; foreach (Control ctrl in this.PlaceHolder1.Controls) { if (ctrl.Visible == true) { iUseCount++; } } if (iUseCount > 0) { btnDeptSign.Visible = true; btnDeptSign2.Visible = true; } else if (hfLeaderSignCount.Value != "0") { btnDeptSign.Visible = false; btnLeaderSign.Visible = true; btnDeptSign2.Visible = false; btnLeaderSign2.Visible = true; } else { btnDeptSign.Visible = false; btnDeptSign2.Visible = false; btnQualitySubmit.Visible = true; }//btnApprove.Visible = true; } if (hfDeptSignCount != null) { hfDeptSignCount.Value = PlaceHolder1.Controls.Count.ToString(); } }