Пример #1
0
        public override SqlParameter[] GetParameters()
        {
            M_User_Plat model = this;

            if (model.CreateTime <= DateTime.MinValue)
            {
                model.CreateTime = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.UserID;
            sp[1].Value  = model.Plat_Group ?? "";
            sp[2].Value  = model.Plat_Role ?? "";
            sp[3].Value  = model.Status;
            sp[4].Value  = model.CreateTime;
            sp[5].Value  = model.CompID;
            sp[6].Value  = model.Mobile;
            sp[7].Value  = model.TrueName;
            sp[8].Value  = model.Post;
            sp[9].Value  = model.UserFace;
            sp[10].Value = model.AtCount;
            return(sp);
        }
Пример #2
0
        public M_User_Plat GetModelFromReader(DbDataReader rdr)
        {
            M_User_Plat model = new M_User_Plat();

            model.UserID     = Convert.ToInt32(rdr["UserID"]);
            model.Plat_Group = ConverToStr(rdr["Plat_Group"]);
            model.Plat_Role  = ConverToStr(rdr["Plat_Role"]);
            model.Status     = ConvertToInt((rdr["Status"]));
            model.CreateTime = ConvertToDate(rdr["CreateTime"]);
            model.UserName   = ConverToStr(rdr["UserName"]);
            model.CompID     = Convert.ToInt32(rdr["CompID"]);
            model.CompName   = ConverToStr(rdr["CompName"]);
            model.Post       = ConverToStr(rdr["Position"]);
            model.Mobile     = ConverToStr(rdr["Mobile"]);
            model.TrueName   = ConverToStr(rdr["TrueName"]);
            model.Post       = ConverToStr(rdr["Post"]);
            model.UserFace   = ConverToStr(rdr["UserFace"]);
            model.Gid        = ConverToStr(rdr["Gid"]);
            model.GroupName  = ConverToStr(rdr["GroupName"]);
            model.AtCount    = ConvertToInt(rdr["ATCount"]);
            rdr.Close();
            return(model);
        }