示例#1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     EnableControl();
     if (m_bllc.GetList("methodName='" + _method + "'", true).Tables[0].Rows.Count > 0)
     {
         //查询最后一项记录
         m_modc = m_bllc.GetModelOfMaxID(_method);
         if (m_modc != null)
         {
             this.cmbAction.Text = "";
             //取最后一条数据的时间点和持续时间 作为下一步骤的时间点
             int sumTime = (int)m_modc.timeCount + (int)m_modc.timeSpan;
             int hour    = (int)sumTime / 3600;
             int min     = (int)(sumTime % 3600) / 60;
             int sec     = (int)sumTime % 60;
             this.lblHour.Text  = hour.ToString("00");
             this.lblMin.Text   = min.ToString("00");
             this.lblSec.Text   = sec.ToString("00");
             this.lblHourc.Text = "00";
             this.lblMinc.Text  = "00";
             this.lblSecc.Text  = "00";
             //持续时间自己定义
         }
     }
     else
     {
         this.lblHour.Text = this.lblHourc.Text = this.lblMin.Text = this.lblMinc.Text = this.lblSec.Text = this.lblSecc.Text = "00";
     }
 }
示例#2
0
        /// <summary>
        /// 获取自定义操作的步骤
        /// </summary>
        /// <param name="methodname"></param>
        /// <returns></returns>
        private DataTable dsCustomActions(string methodname)
        {
            DataTable dt = new DataTable();

            ALS.BLL.customactions bllcustom = new ALS.BLL.customactions();
            dt = bllcustom.GetList(" methodname='" + methodname + "'", true).Tables[0];
            return(dt);
        }
示例#3
0
        private DataTable dsCustomActions(string methodname)
        {
            DataTable dt = new DataTable();

            ALS.BLL.customactions bllcustom = new ALS.BLL.customactions();
            dt = bllcustom.GetList(" methodname='" + methodname + "'", true).Tables[0];
            dt.Columns.Add("序号", System.Type.GetType("System.String")).SetOrdinal(1);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i][1] = (i + 1).ToString();
            }
            return(dt);
        }