Esempio n. 1
0
        public override SqlParameter[] GetParameters()
        {
            M_MailInfo model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.MailTitle;
            sp[2].Value  = model.MailContext;
            sp[3].Value  = model.MailSendTime;
            sp[4].Value  = model.MailAddTime;
            sp[5].Value  = model.MailState;
            sp[6].Value  = model.MailAddRees;
            sp[7].Value  = model.UserID;
            sp[8].Value  = model.SendMail;
            sp[9].Value  = model.Files;
            sp[10].Value = model.MID;
            return(sp);
        }
Esempio n. 2
0
        public M_MailInfo GetModelFromReader(DbDataReader rdr)
        {
            M_MailInfo model = new M_MailInfo();

            model.ID           = Convert.ToInt32(rdr["ID"]);
            model.MailTitle    = rdr["MailTitle"].ToString();
            model.MailContext  = rdr["Cprovinceno"].ToString();
            model.MailSendTime = Convert.ToDateTime(rdr["MailSendTime"]);
            model.MailAddTime  = Convert.ToDateTime(rdr["MailAddTime"]);
            model.MailState    = Convert.ToBoolean(rdr["MailState"]);
            model.MailAddRees  = rdr["MailAddRees"].ToString();
            model.UserID       = Convert.ToInt32(rdr["UserID"]);
            model.SendMail     = rdr["SendMail"].ToString();
            model.Files        = rdr["Files"].ToString();
            model.MID          = Convert.ToInt32(rdr["MID"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }