示例#1
0
        // 如果活动返回值,则从 CodeActivity<TResult>
        // 派生并从 Execute 方法返回该值。
        protected override void Execute(CodeActivityContext context)
        {
            // 获取 Text 输入参数的运行时值
            string       OrderOID = context.GetValue(this.OrderOID);
            ISession     session  = SessionFactory.GetCurrentSession();
            ITransaction tr       = session.BeginTransaction();
            CTOR_ORDER   order    = session.QueryOver <CTOR_ORDER>().Where(t => t.OID == OrderOID).List <CTOR_ORDER>().FirstOrDefault();

            order.CURSTATE  = 6;
            order.DATASTATE = "";
            session.SaveOrUpdate(order);
            session.Flush();
            tr.Commit();
        }
示例#2
0
        // 如果活动返回值,则从 CodeActivity<TResult>
        // 派生并从 Execute 方法返回该值。
        protected override void Execute(CodeActivityContext context)
        {
            ISession     session  = SessionFactory.GetCurrentSession();
            ITransaction tr       = session.BeginTransaction();
            string       orderOID = context.GetValue(this.OrderOID);
            CTOR_ORDER   order    = session.QueryOver <CTOR_ORDER>().Where(t => t.OID == orderOID).List <CTOR_ORDER>().FirstOrDefault();

            if (order != null)
            {
                order.CURSTATE   = 1;
                order.DATASTATE  = "0";
                order.ADUITBATCH = Guid.NewGuid().ToString();
                session.SaveOrUpdate(order);
                session.Flush();
                tr.Commit();
            }
        }