Exemplo n.º 1
0
        public M_Mobile_PushAPI GetModelFromReader(DbDataReader rdr)
        {
            M_Mobile_PushAPI model = new M_Mobile_PushAPI();

            model.ID        = ConvertToInt(rdr["ID"]);
            model.Alias     = ConverToStr(rdr["Alias"]);
            model.APPKey    = ConverToStr(rdr["APPKey"]);
            model.APPSecret = ConverToStr(rdr["APPSecret"]);
            model.CDate     = ConvertToDate(rdr["CDate"]);
            model.Plat      = ConvertToInt(rdr["Plat"]);
            rdr.Close();
            return(model);
        }
Exemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Mobile_PushAPI model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.Alias;
            sp[2].Value = model.APPKey;
            sp[3].Value = model.APPSecret;
            sp[4].Value = model.CDate;
            sp[5].Value = model.Plat;
            return(sp);
        }