Пример #1
0
        public M_User_Follow GetModelFromReader(DbDataReader rdr)
        {
            M_User_Follow model = new M_User_Follow();

            model.ID      = Convert.ToInt32(rdr["ID"]);
            model.UserID  = ConvertToInt(rdr["UserID"]);
            model.TUserID = ConvertToInt(rdr["TUserID"]);
            model.CDate   = ConvertToDate(rdr["CDate"]);
            model.ZSource = ConverToStr(rdr["ZSource"]);
            rdr.Close();
            return(model);
        }
Пример #2
0
        public override SqlParameter[] GetParameters()
        {
            M_User_Follow model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            if (string.IsNullOrEmpty(ZSource))
            {
                ZSource = "user";
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.UserID;
            sp[2].Value = model.TUserID;
            sp[3].Value = model.CDate;
            sp[4].Value = model.ZSource;
            return(sp);
        }