Esempio n. 1
0
 private void CheckPercent(string strWBSCode, string strPercent)
 {
     if (int.Parse(strPercent) >= 100)
     {
         WBSStatus myChangeStatus = new WBSStatus();
         // 更新任务状态为完成
         myChangeStatus.FinishProcess(strWBSCode, DateTime.Now.ToString("yyyy-MM-dd"), (string)ViewState["ProjectCode"]);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 更新进度和状态
        /// </summary>
        /// <param name="strWBSCode"></param>
        /// <param name="strPercent"></param>
        private void CheckPercent(string strWBSCode, string strPercent)
        {
            WBSStatus myChangeStatus = new WBSStatus();

            if (int.Parse(strPercent) >= 100)
            {
                // 更新任务状态为完成
                myChangeStatus.FinishProcess(strWBSCode, DateTime.Now.ToString("yyyy-MM-dd"), (string)ViewState["ProjectCode"]);
                return;
            }

            int status = BLL.WBSRule.GetTaskStatus(strWBSCode);

            if (status == 0 && int.Parse(strPercent) > 0)
            {
                myChangeStatus.StartProcess(strWBSCode, DateTime.Now.ToString("yyyy-MM-dd"));
            }
        }
Esempio n. 3
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("");
 }
Esempio n. 4
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);
        }