Exemple #1
0
 // 检测当前节点是否所有子节点都已经完成。
 private string CheckFinish()
 {
     for (int i = 0; i < this.dgDetailData.Items.Count; i++)
     {
         string txtPercent = ((TextBox)this.dgDetailData.Items[i].FindControl("txtPercent")).Text.Trim();
         // 没有到100%不需要检测子项
         if (int.Parse(txtPercent) < 100)
         {
             return("");
         }
         string    Code     = this.dgDetailData.DataKeys[i].ToString();
         WBSStatus myStatus = new WBSStatus();
         if (!myStatus.IsAllFinish(Code, (string)ViewState["ProjectCode"]))
         {
             return(Code);
         }
     }
     return("");
 }
Exemple #2
0
        /// <summary>
        /// 有效性检查
        /// </summary>
        /// <param name="Hint"></param>
        /// <returns></returns>
        private bool CheckValid(ref string Hint)
        {
            Hint = "";

            if (this.ftbDetail.HtmlStrippedText.Length < 1)
            {
                Hint = "请输入执行情况";
                return(false);
            }

            // 检测子项是否完成
            WBSStatus myChangeStatus = new WBSStatus();

            if (this.txtPercent.Enabled == true && int.Parse(this.txtPercent.Text) > 100 && !myChangeStatus.IsAllFinish(this.txtWBSCode.Value, (string)ViewState["ProjectCode"]))
            {
                Hint = "当前任务还有子项没有结束,所以进度不能为100%!";
                return(false);
            }

            return(true);
        }