Пример #1
0
 public static int DeleteWorkFlow(string workflowId)
 {
     if (workflowId.Trim().Length == 0 || workflowId == null)
         throw new Exception("DeleteWorkFlow方法错误,workflowId 不能为空!");
     try
     {
         WF_WorkFlow wf = new WF_WorkFlow();
         wf.WorkFlowId = workflowId;
         return MainHelper.PlatformSqlMap.DeleteByKey<WF_WorkFlow>(wf);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
        private void frmExcelEditSQLSet_Load(object sender, EventArgs e) {
            cbxSWorkFolwDataTable.Items.Clear();
            cbxTWorkFolwDataTable.Items.Clear();
            comboBox1.Items.Clear();
            ListItem l = new ListItem("###", "请选择");
            cbxSWorkFolwDataTable.Items.Add(l);
            cbxTWorkFolwDataTable.Items.Add(l);
            IList li = MainHelper.PlatformSqlMap.GetList("SelectWF_WorkFlowList", "    where 1=1 order by FlowCaption ");

            DataTable dt = ConvertHelper.ToDataTable(li);
            WinFormFun.LoadComboBox(cbxTWorkFolwDataTable, dt, "WorkFlowId", "FlowCaption");

            WF_WorkFlow wf = new WF_WorkFlow();
            wf.FlowCaption = "无";
            wf.WorkFlowId = "无";
            li.Insert(0, wf);
            dt = ConvertHelper.ToDataTable(li);
            WinFormFun.LoadComboBox(cbxSWorkFolwDataTable, dt, "WorkFlowId", "FlowCaption");

            WinFormFun.LoadComboBox(cbxTWorkFolwDataTable, dt, "WorkFlowId", "FlowCaption");
            l = new ListItem("下拉并选中", "下拉并选中");
            comboBox1.Items.Add(l);
            l = new ListItem("下拉不选中", "下拉不选中");
            comboBox1.Items.Add(l);
            l = new ListItem("赋值", "赋值");
            comboBox1.Items.Add(l);

            setComoboxFocusIndex(cbxSWorkFolwDataTable, rowData.slcid);
            setComoboxFocusIndex(cbxTWorkFolwDataTable, rowData.tlcid);
            if (strtype == "edit") {
                setComoboxFocusIndex(cbxSWorkFolwDataTable, rowData.slcid);
                setComoboxFocusIndex(cbxSWorkTastDataTable, rowData.slcjdid);
                setComoboxFocusIndex(cbxSWorkTastzdDataTable, rowData.slcjdzdid);
                tetSWorkSQL.Text = rowData.sSQL;
                setComoboxFocusIndex(comboBox1, rowData.cdfs);
                setComoboxFocusIndex(cbxTWorkFolwDataTable, rowData.tlcid);
                setComoboxFocusIndex(cbxTWorkTastDataTable, rowData.tlcjdid);
                setComoboxFocusIndex(cbxTWorkTastzdDataTable, rowData.tlcjdzdid);
                tetTWorkSQL.Text = rowData.tSQL;
            }

        }
Пример #3
0
        //private void setParameter()
        //{
        //    sqlDataItem.ParameterList.Clear();
        //    sqlDataItem.AppendParameter("@WorkFlowId", WorkFlowId);
        //    sqlDataItem.AppendParameter("@WFClassId", WorkFlowClassId);
        //    sqlDataItem.AppendParameter("@FlowCaption", WorkFlowCaption);
        //    sqlDataItem.AppendParameter("@Description", Description);
        //    sqlDataItem.AppendParameter("@Status", Status);
        //    sqlDataItem.AppendParameter("@MgrUrl", MgrUrl);
			


        //}
        //private void setInsertSql()
        //{
        //    string tmpValueList="";
        //    string tmpFieldName="";
        //    sqlString="insert into "+tableName+"(";
        //    int tmpInt=this.fieldList.Length;
        //    for(int i=0;i<tmpInt-1;i++)
        //    {
        //        tmpFieldName=fieldList[i].ToString();
        //        sqlString=sqlString+tmpFieldName+",";
        //        tmpValueList=tmpValueList+"@"+tmpFieldName+",";

        //    }
        //    tmpFieldName=this.fieldList[tmpInt-1].ToString();
        //    sqlString=sqlString+tmpFieldName;
        //    tmpValueList=tmpValueList+"@"+tmpFieldName;
        //    this.sqlString=sqlString+")values("+tmpValueList+")";
        //    sqlDataItem.CommandText = sqlString;
        //}
        //private void setUpdateSql()
        //{
        //    string tmpFieldName="";
        //    int tmpInt=this.fieldList.Length;
        //    sqlString="update "+tableName+" set ";
        //    for(int i=0;i<tmpInt-1;i++)
        //    {
        //        tmpFieldName=this.fieldList[i].ToString();
        //        sqlString=sqlString+tmpFieldName+"=@"+tmpFieldName+",";
				
        //    }
        //    tmpFieldName=fieldList[tmpInt-1].ToString();
        //    sqlString=sqlString+tmpFieldName+"=@"+tmpFieldName;
        //    sqlString=sqlString+" where "+keyField+"=@"+keyField;
        //    sqlDataItem.CommandText = sqlString;
        //}

		/// <summary>
		/// 新建 一个流程模板
		/// </summary>
        public void InsertWorkFlow()
		{
			if (WorkFlowId.Trim().Length==0||WorkFlowId==null)
                throw new Exception("InsertWorkFlow方法错误,WorkFlowId 不能为空!");
			
			try
			{
                //setInsertSql();//设定insert语句
                //setParameter();//设定参数
                //ClientDBAgent agent = new ClientDBAgent();
                //agent.ExecuteNonQuery(sqlDataItem);
                WF_WorkFlow wf = new WF_WorkFlow();
                wf.WorkFlowId= WorkFlowId;
                wf.WFClassId= WorkFlowClassId;
                wf.FlowCaption= WorkFlowCaption;
                wf.Description= Description;
                wf.Status= Status;
                wf.MgrUrl= MgrUrl;
                MainHelper.PlatformSqlMap.Create<WF_WorkFlow>(wf);
			}
            catch (Exception ex)
            {
                throw ex;
            }
		}
Пример #4
0
 void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) {
     if (FocusedNodeChanged != null)
     {
         //DataRow dr = treeList1.GetDataRecordByNode(e.Node) as DataRow;
         
         WF_WorkFlow wf = new WF_WorkFlow();
         if (e.Node["Kind"].ToString() == "流程")
         {
             wf.FlowCaption = e.Node["FlowCaption"].ToString();
             wf.WFClassId = e.Node["WFClassId"].ToString();
             wf.WorkFlowId = e.Node["WorkFlowId"].ToString();
             FocusedNodeChanged(treeList1, wf);
         }
         else
         {
             FocusedNodeChanged(treeList1, null);
         
         }
         
     }
 }
Пример #5
0
 void treeViewOperator_AfterAdd(WF_WorkFlow newobj) {
     if (AfterAdd != null)
         AfterAdd(treeList1, newobj);
 }
Пример #6
0
 void treeViewOperator_AfterDelete(WF_WorkFlow newobj) {
     if (AfterDelete != null)
         AfterDelete(treeList1, newobj);                
 }
Пример #7
0
 void treeViewOperator_CreatingObject(WF_WorkFlow newobj) {
     //newobj.OrgType = "0";
 }