Exemplo n.º 1
0
        public override IModel CreateModel(SqlDataReader dr)
        {
            PledgeApply pledgeapply = new PledgeApply();

            int indexPledgeApplyId = dr.GetOrdinal("PledgeApplyId");
            pledgeapply.PledgeApplyId = Convert.ToInt32(dr[indexPledgeApplyId]);

            int indexApplyId = dr.GetOrdinal("ApplyId");
            if (dr["ApplyId"] != DBNull.Value)
            {
                pledgeapply.ApplyId = Convert.ToInt32(dr[indexApplyId]);
            }

            int indexPledgeBank = dr.GetOrdinal("PledgeBank");
            if (dr["PledgeBank"] != DBNull.Value)
            {
                pledgeapply.PledgeBank = Convert.ToInt32(dr[indexPledgeBank]);
            }

            int indexCreatorId = dr.GetOrdinal("CreatorId");
            if (dr["CreatorId"] != DBNull.Value)
            {
                pledgeapply.CreatorId = Convert.ToInt32(dr[indexCreatorId]);
            }

            int indexCreateTime = dr.GetOrdinal("CreateTime");
            if (dr["CreateTime"] != DBNull.Value)
            {
                pledgeapply.CreateTime = Convert.ToDateTime(dr[indexCreateTime]);
            }

            int indexLastModifyId = dr.GetOrdinal("LastModifyId");
            if (dr["LastModifyId"] != DBNull.Value)
            {
                pledgeapply.LastModifyId = Convert.ToInt32(dr[indexLastModifyId]);
            }

            int indexLastModifyTime = dr.GetOrdinal("LastModifyTime");
            if (dr["LastModifyTime"] != DBNull.Value)
            {
                pledgeapply.LastModifyTime = Convert.ToDateTime(dr[indexLastModifyTime]);
            }

            return pledgeapply;
        }
Exemplo n.º 2
0
        public override IModel CreateModel(DataRow dr)
        {
            PledgeApply pledgeapply = new PledgeApply();

            pledgeapply.PledgeApplyId = Convert.ToInt32(dr["PledgeApplyId"]);

            if (dr["ApplyId"] != DBNull.Value)
            {
                pledgeapply.ApplyId = Convert.ToInt32(dr["ApplyId"]);
            }

            if (dr["PledgeBank"] != DBNull.Value)
            {
                pledgeapply.PledgeBank = Convert.ToInt32(dr["PledgeBank"]);
            }

            if (dr["CreatorId"] != DBNull.Value)
            {
                pledgeapply.CreatorId = Convert.ToInt32(dr["CreatorId"]);
            }

            if (dr["CreateTime"] != DBNull.Value)
            {
                pledgeapply.CreateTime = Convert.ToDateTime(dr["CreateTime"]);
            }

            if (dr["LastModifyId"] != DBNull.Value)
            {
                pledgeapply.LastModifyId = Convert.ToInt32(dr["LastModifyId"]);
            }

            if (dr["LastModifyTime"] != DBNull.Value)
            {
                pledgeapply.LastModifyTime = Convert.ToDateTime(dr["LastModifyTime"]);
            }

            return pledgeapply;
        }