Example #1
0
        public override SqlParameter[] GetParameters()
        {
            M_MailManage model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.Email;
            sp[2].Value = model.Postfix;
            sp[3].Value = model.AddTime;
            sp[4].Value = model.BackMostTime;
            sp[5].Value = model.SubscribeToType;
            sp[6].Value = model.UserID;
            sp[7].Value = model.State;
            return(sp);
        }
Example #2
0
        public M_MailManage GetModelFromReader(DbDataReader rdr)
        {
            M_MailManage model = new M_MailManage();

            model.ID              = Convert.ToInt32(rdr["ID"]);
            model.Email           = rdr["Email"].ToString();
            model.Postfix         = rdr["Postfix"].ToString();
            model.AddTime         = Convert.ToDateTime(rdr["AddTime"]);
            model.BackMostTime    = Convert.ToDateTime(rdr["BackMostTime"]);
            model.SubscribeToType = rdr["SubscribeToType"].ToString();
            model.UserID          = Convert.ToInt32(rdr["UserID"]);
            model.State           = Convert.ToBoolean(rdr["State"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }