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

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Code;
            sp[2].Value  = model.UserID;
            sp[3].Value  = model.UserName;
            sp[4].Value  = model.JoinGroup;
            sp[5].Value  = model.CUser;
            sp[6].Value  = model.CAdmin;
            sp[7].Value  = model.CDate;
            sp[8].Value  = model.Remind;
            sp[9].Value  = model.ZStatus;
            sp[10].Value = model.UsedUserName;
            sp[11].Value = model.Flow;
            sp[12].Value = model.UsedDate;
            sp[13].Value = model.UsedUserID;
            return(sp);
        }
Esempio n. 2
0
        public M_User_InviteCode GetModelFromReader(DbDataReader rdr)
        {
            M_User_InviteCode model = new M_User_InviteCode();

            model.ID           = ConvertToInt(rdr["ID"]);
            model.Code         = ConverToStr(rdr["Code"]);
            model.UserID       = ConvertToInt(rdr["UserID"]);
            model.UserName     = ConverToStr(rdr["UserName"]);
            model.JoinGroup    = ConvertToInt(rdr["JoinGroup"]);
            model.CUser        = ConvertToInt(rdr["CUser"]);
            model.CAdmin       = ConvertToInt(rdr["CAdmin"]);
            model.CDate        = ConvertToDate(rdr["CDate"]);
            model.Remind       = ConverToStr(rdr["Remind"]);
            model.ZStatus      = ConvertToInt(rdr["ZStatus"]);
            model.UsedUserName = ConverToStr(rdr["UsedUserName"]);
            model.Flow         = ConverToStr(rdr["Flow"]);
            model.UsedDate     = ConverToStr(rdr["UsedDate"]);
            model.UsedUserID   = ConvertToInt(rdr["UsedUserID"]);
            rdr.Close();
            return(model);
        }