Esempio n. 1
0
        public FlowInstance(int id)
        {
            m_FlowInstanceId = id;

            F_INST_FLOW instFlow = DAL.WorkFlow.FlowInstance.Get(m_FlowInstanceId);

            m_FlowDefine = new FlowDefine(instFlow.FlowID);

            m_FlowNo = instFlow.FlowNo;

            m_Status = instFlow.State;

            m_FormDigest = instFlow.Digest;

            m_ApplerId = instFlow.ApplyerID;

            m_BeginDate = instFlow.BeginDate;
        }
Esempio n. 2
0
        public FlowInstance(int flowId, int flowNo)
        {
            F_INST_FLOW instFlow = DAL.WorkFlow.FlowInstance.Get(flowId, flowNo);

            if (instFlow != null)
            {
                m_FlowInstanceId = instFlow.ID;

                m_FlowDefine = new FlowDefine(instFlow.FlowID);

                m_FlowNo = instFlow.FlowNo;

                m_Status = instFlow.State;

                m_FormDigest = instFlow.Digest;

                m_ApplerId = instFlow.ApplyerID;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 创建流程实例
        /// </summary>
        /// <param name="flow"></param>
        /// <returns></returns>
        public void Create(int flowId, int flowNo, int applyerId, string digest)
        {
            m_FlowDefine = new FlowDefine(flowId);

            F_INST_FLOW inst = new F_INST_FLOW();

            //IPrimaryKeyCreater prikey = ctx["PrimaryKeyCreater"] as IPrimaryKeyCreater;

            m_FlowInstanceId = PrimaryKeyCreater.getIntPrimaryKey("F_INST_FLOW");

            inst.ID        = m_FlowInstanceId;
            inst.ApplyerID = applyerId;
            inst.BeginDate = DateTime.Now;
            inst.EndDate   = null;
            inst.FlowID    = flowId;
            inst.State     = FlowInstanceState.InActive;
            inst.FlowNo    = flowNo;
            inst.Digest    = digest;

            DAL.WorkFlow.FlowInstance.Insert(inst);
        }