コード例 #1
0
 public void SetEnt(BuWFRelationship ent, IDataReader dr)
 {
     ent.RelationshipId  = MyConvert.ToInt(dr["RelationshipId"]);
     ent.WorkflowGUID    = MyConvert.ToString(dr["WorkflowGUID"]);
     ent.LastProcessId   = MyConvert.ToInt(dr["LastProcessId"]);
     ent.CurProcessId    = MyConvert.ToInt(dr["CurProcessId"]);
     ent.NextProcessId   = MyConvert.ToInt(dr["NextProcessId"]);
     ent.ApprovePostId   = MyConvert.ToInt(dr["ApprovePostId"]);
     ent.ApprovePostName = MyConvert.ToString(dr["ApprovePostName"]);
     ent.Enable          = MyConvert.ToInt(dr["Enable"]);
 }
コード例 #2
0
        /// <summary>
        /// 得到列表
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public List <BuWFRelationship> GetBuWFRelationshipList(string Where)
        {
            List <BuWFRelationship> list = new List <BuWFRelationship>();

            using (DbDataReader reader = DataBaseManage.ExecuteReader(DalSql + Where))
            {
                while (reader.Read())
                {
                    BuWFRelationship ent = new BuWFRelationship();
                    SetEnt(ent, reader);
                    list.Add(ent);
                }
            }
            return(list);
        }
コード例 #3
0
        /// <summary>
        /// 根据RelationshipId得到 BuWFRelationship 实体
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public BuWFRelationship GetBuWFRelationship(int RelationshipId)
        {
            BuWFRelationship ent = null;
            string           sql = DalSql;

            sql = sql + " And  RelationshipId";
            MySqlParameter[] paras = new MySqlParameter[]
            {
                new MySqlParameter("RelationshipId", RelationshipId)
            };
            using (DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras))
            {
                if (reader.Read())
                {
                    ent = new BuWFRelationship();
                    SetEnt(ent, reader);
                }
            }
            return(ent);
        }