예제 #1
0
        /// <summary>
        /// 得到列表
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public List <BuScheduleApply> GetBuScheduleApplyList(string Where)
        {
            List <BuScheduleApply> list = new List <BuScheduleApply>();

            using (DbDataReader reader = DataBaseManage.ExecuteReader(DalSql + Where))
            {
                while (reader.Read())
                {
                    BuScheduleApply ent = new BuScheduleApply();
                    SetEnt(ent, reader);
                    list.Add(ent);
                }
            }
            return(list);
        }
예제 #2
0
        /// <summary>
        /// 根据ApplyId得到 BuScheduleApply 实体
        /// </summary>
        /// <param name="ent"></param>
        /// <returns></returns>
        public BuScheduleApply GetBuScheduleApply(string ApplyId)
        {
            BuScheduleApply ent = null;
            string          sql = DalSql;

            sql = sql + " And  ApplyId";
            MySqlParameter[] paras = new MySqlParameter[]
            {
                new MySqlParameter("ApplyId", ApplyId)
            };
            using (DbDataReader reader = DataBaseManage.ExecuteReader(sql, paras))
            {
                if (reader.Read())
                {
                    ent = new BuScheduleApply();
                    SetEnt(ent, reader);
                }
            }
            return(ent);
        }
예제 #3
0
 public void SetEnt(BuScheduleApply ent, IDataReader dr)
 {
     ent.ApplyId   = MyConvert.ToString(dr["ApplyId"]);
     ent.ApplyMan  = MyConvert.ToString(dr["ApplyMan"]);
     ent.ApplyDate = MyConvert.ToDateTime(dr["ApplyDate"]);
 }