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

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.Name      = ConverToStr(rdr["Name"]);
            model.APPKey    = ConverToStr(rdr["APPKey"]);
            model.APPSecret = ConverToStr(rdr["APPSecret"]);
            model.CallBack  = ConverToStr(rdr["CallBack"]);
            model.Flag      = ConverToStr(rdr["Flag"]);
            model.ZStatus   = ConvertToInt(rdr["ZStatus"]);
            model.CDate     = ConvertToDate(rdr["CDate"]);
            model.Remind    = ConverToStr(rdr["Remind"]);
            model.UserName  = ConverToStr(rdr["UserName"]);
            model.UserPwd   = ConverToStr(rdr["UserPwd"]);
            model.APPID     = ConverToStr(rdr["APPID"]);
            rdr.Close();
            return(model);
        }
Exemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Third_PlatInfo model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Name;
            sp[2].Value  = model.APPKey;
            sp[3].Value  = model.APPSecret;
            sp[4].Value  = model.CallBack;
            sp[5].Value  = model.Flag;
            sp[6].Value  = model.ZStatus;
            sp[7].Value  = model.CDate;
            sp[8].Value  = model.Remind;
            sp[9].Value  = model.UserName;
            sp[10].Value = model.UserPwd;
            sp[11].Value = model.APPID;
            return(sp);
        }