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

            model.UserId       = Convert.ToInt32(rdr["UserID"]);
            model.TrueName     = ConverToStr(rdr["TrueName"]);
            model.BirthDay     = ConverToStr(rdr["BirthDay"]);
            model.Address      = ConverToStr(rdr["Address"]);
            model.HomePhone    = ConverToStr(rdr["HomePhone"]);
            model.Fax          = ConverToStr(rdr["Fax"]);
            model.ZipCode      = ConverToStr(rdr["ZipCode"]);
            model.Mobile       = rdr["Mobile"].ToString();
            model.UserSex      = ConverToBool(rdr["UserSex"]);
            model.QQ           = ConverToStr(rdr["QQ"]);
            model.MSN          = ConverToStr(rdr["MSN"]);
            model.ICQ          = ConverToStr(rdr["ICQ"]);
            model.UC           = ConverToStr(rdr["UC"]);
            model.Yahoo        = ConverToStr(rdr["Yahoo"]);
            model.IDCard       = ConverToStr(rdr["IDCard"]);
            model.HomePage     = ConverToStr(rdr["HomePage"]);
            model.UserFace     = ConverToStr(rdr["UserFace"]);
            model.FaceWidth    = ConvertToInt(rdr["FaceWidth"]);
            model.FaceHeight   = ConvertToInt(rdr["FaceHeight"]);
            model.Sign         = ConverToStr(rdr["Sign"]);
            model.Country      = ConverToStr(rdr["Country"]);
            model.Privating    = ConvertToInt(rdr["Privacy"]);
            model.Province     = ConverToStr(rdr["Province"]);
            model.City         = ConverToStr(rdr["City"]);
            model.County       = ConverToStr(rdr["County"]);
            model.CardType     = ConverToStr(rdr["cardType"]);
            model.OfficePhone  = ConverToStr(rdr["OfficePhone"]);
            model.PHS          = ConverToStr(rdr["PHS"]);
            model.HoneyName    = ConverToStr(rdr["honeyName"]);
            model.Shengxiao    = ConverToStr(rdr["Shengxiao"]);
            model.Xingzuo      = ConverToStr(rdr["Xingzuo"]);
            model.WorkProvince = rdr["WorkProvince"].ToString();
            model.WorkCounty   = rdr["workCity"].ToString();
            model.SFStatus     = ConvertToInt(rdr["SFStatus"]);
            model.VIPUser      = ConvertToInt(rdr["VIPUser"]);
            model.Bugle        = ConvertToInt(rdr["Bugle"]);
            model.Position     = ConverToStr(rdr["Position"]);
            model.CompanyName  = ConverToStr(rdr["Corp"]);
            rdr.Close();
            return(model);
        }
Exemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Uinfo model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.UserId;
            sp[1].Value  = model.TrueName;
            sp[2].Value  = model.BirthDay;
            sp[3].Value  = model.Address;
            sp[4].Value  = model.HomePhone;
            sp[5].Value  = model.Fax;
            sp[6].Value  = model.ZipCode;
            sp[7].Value  = model.Mobile;
            sp[8].Value  = model.UserSex;
            sp[9].Value  = model.QQ;
            sp[10].Value = model.MSN;
            sp[11].Value = model.ICQ;
            sp[12].Value = model.UC;
            sp[13].Value = model.Yahoo;
            sp[14].Value = model.IDCard;
            sp[15].Value = model.HomePage;
            sp[16].Value = model.userFace;
            sp[17].Value = model.FaceWidth;
            sp[18].Value = model.FaceHeight;
            sp[19].Value = model.Sign;
            sp[20].Value = model.Country;
            sp[21].Value = model.Province;
            sp[22].Value = model.City;
            sp[23].Value = model.County;
            sp[24].Value = model.Privating;
            sp[25].Value = model.OfficePhone;
            sp[26].Value = model.PHS;
            sp[27].Value = model.HoneyName;
            sp[28].Value = model.CardType;
            sp[29].Value = model.Shengxiao;
            sp[30].Value = model.Xingzuo;
            sp[31].Value = model.WorkProvince;
            sp[32].Value = model.WorkCounty;
            sp[33].Value = model.SFStatus;
            sp[34].Value = model.VIPUser;
            sp[35].Value = model.Bugle;
            sp[36].Value = model.Position;
            sp[37].Value = model.CompanyName;
            return(sp);
        }