//上报
        protected void Apply_Click(object sender, EventArgs e)
        {
            string piid = Guid.NewGuid().ToString();
            ////string bizPid = "";
            string     instanceName = string.Format("{0}_{1}", scope.Items[scope.SelectedIndex].Text, year.Items[year.SelectedIndex].Text);
            BizProcess bizPro       = new BizProcessAdapter().GetModelByID(bizPid);

            bizPro.Title  = bizPro.Title + "UDP";
            bizPro.Status = 2;//状态:1未上报;2运行中;4审批完成,归档中;8被退回;流程结束;16流程已取消;32已归档;
            UpdateBizProceee(bizPro);
            List <ProcessNodeInstance> list = CreateNodeInstance(bizPid);
            Hashtable ht = new Hashtable();
            WorkflowStartEventArgs startEvt = new WorkflowStartEventArgs(PROCESSCODE, bizPid, "", instanceName, 1, note.InnerText, list, ht);

            startEvt.SaveWorkflow(instanceName);
            //WorkflowInstance.Start(piid, PROCESSCODE, bizPid, string.Empty, instanceName, note.InnerText, list, ht);
        }
        //保存
        protected void SaveDraft_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(bizPid))
            {
                return;
            }

            BizProcess bizPro = new BizProcessAdapter().GetModelByID(bizPid);

            bizPro.Title  = bizPro.Title + "UDP";
            bizPro.Status = 1;//状态:1未上报;2运行中;4审批完成,归档中;8被退回;流程结束;16流程已取消;32已归档;
            UpdateBizProceee(bizPro);


            //TODO:这里需要处理业务数据的保存。

            //string piid = Guid.NewGuid().ToString();
            //string bizPid = "";
            ////string instanceName = string.Format("{0}_{1}", scope.Items[scope.SelectedIndex].Text, year.Items[year.SelectedIndex].Text);
            //List<ProcessNodeInstance> list = CreateNodeInstance(bizPid);
            //Hashtable ht = new Hashtable();
            //WorkflowStartEventArgs startEvt = new WorkflowStartEventArgs(PROCESSCODE, bizPid, "", instanceName, 1, note.InnerText, list, ht);
            //startEvt.SaveWorkflow(instanceName);
        }