Ejemplo n.º 1
0
 //新增时初始化节点列表
 public void init()
 {
     BLL.WORKNODE   worknodeBll = new BLL.WORKNODE();
     BLL.WORKFLOW   workflowBll = new BLL.WORKFLOW();
     Model.WORKFLOW workflowMdl = new Model.WORKFLOW();
     if (_enumStatus == StatusClass.AddNew)
     {
         workflowMdl = workflowBll.GetModel(workflowsetaddMdl.WORKFLOWNAME);
         int     workflowno = workflowMdl.WORKFLOWNO;
         DataSet ds         = worknodeBll.GetList(" NODENO not in(select NODENO from WORKFLOWSET  where workflowno  = " + workflowno.ToString() + " and NODENO is not null)");
         this.cbb_nodename.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
         cbb_nodename.Properties.Items.Clear();
         cbb_nodename.EditValue           = null;
         cbb_nodename.Properties.NullText = "--请选择--";
         for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
         {
             string nodename = ds.Tables[0].Rows[i]["nodename"].ToString();
             this.cbb_nodename.Properties.Items.Add(nodename);
         }
     }
     else if (_enumStatus == StatusClass.Edit)
     {
         workflowMdl = workflowBll.GetModel(workflowsetaddMdl.WORKFLOWNAME);
         int     workflowno = workflowMdl.WORKFLOWNO;
         DataSet ds         = worknodeBll.GetList(" NODENO not in(select NODENO from WORKFLOWSET  where workflowno  = " + workflowno.ToString() + " and NODENO is not null)");
         this.cbb_nodename.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
         cbb_nodename.Properties.Items.Clear();
         cbb_nodename.EditValue = workflowsetaddMdl.NODENAME;
         for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
         {
             this.cbb_nodename.Properties.Items.Add(ds.Tables[0].Rows[i]["nodename"].ToString());
         }
         this.cbb_nodename.Properties.Items.Add(workflowsetaddMdl.NODENAME);
         this.te_workflowname.Text = workflowsetaddMdl.WORKFLOWNAME;
         this.cbb_nodeorder.Text   = workflowsetaddMdl.NODEORDER.ToString();
         this.de_begintime.Text    = workflowsetaddMdl.BEGINTIME.ToString();
         this.de_endtime.Text      = workflowsetaddMdl.ENDTIME.ToString();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化节点列表
        /// </summary>
        private void init_node()
        {
            Student.BLL.WORKNODE worknodeBll = new BLL.WORKNODE();
            DataSet ds = worknodeBll.GetList("");

            this.cbb_Node.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
            cbb_Node.Properties.Items.Clear();
            cbb_Node.EditValue           = null;
            cbb_Node.Properties.NullText = "--请选择--";

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                string nodeName = ds.Tables[0].Rows[i]["NODENAME"].ToString();
                this.cbb_Node.Properties.Items.Add(nodeName);
            }
        }