示例#1
0
        public M_User_Friend GetModelFromReader(DbDataReader rdr)
        {
            M_User_Friend model = new M_User_Friend();

            model.ID       = Convert.ToInt32(rdr["ID"]);
            model.UserID   = ConvertToInt(rdr["UserID"]);
            model.TUserID  = ConvertToInt(rdr["TUserID"]);
            model.FGroupID = ConvertToInt(rdr["FGroupID"]);
            model.FType    = ConvertToInt(rdr["FType"]);
            model.ZStatus  = ConvertToInt(rdr["ZStatus"]);
            model.Remind   = ConverToStr(rdr["Remind"]);
            model.CDate    = ConvertToDate(rdr["CDate"]);
            rdr.Close();
            return(model);
        }
示例#2
0
        public override SqlParameter[] GetParameters()
        {
            M_User_Friend model = this;

            if (CDate <= DateTime.MinValue)
            {
                CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.UserID;
            sp[2].Value = model.TUserID;
            sp[3].Value = model.FGroupID;
            sp[4].Value = model.FType;
            sp[5].Value = model.ZStatus;
            sp[6].Value = model.Remind;
            sp[7].Value = model.CDate;
            return(sp);
        }