public void ShowInfo(MemberInfo userInfo) { PersonMemberInfo model = userInfo as PersonMemberInfo; if (model != null) { this.txtIdCard.Text = model.IdCard; this.txtMobile.Text = model.Mobile; this.txtTelephone.Text = model.Telephone; } }
public void GetInputInfo(MemberInfo userInfo) { PersonMemberInfo model = userInfo as PersonMemberInfo; if (model != null) { model.IdCard = txtIdCard.Text.Trim(); model.Telephone = txtTelephone.Text.Trim(); model.Mobile = txtMobile.Text.Trim(); } }
public void ShowInfo(MemberInfo userInfo) { FamlyMemberInfo model = userInfo as FamlyMemberInfo; if (model != null) { this.txtIdCard.Text = model.IdCard; this.txtAddress.Text = model.Address; this.ucRegion.PresetRegionInfo(model.RegionPath); this.txtMobile.Text = model.Mobile; this.txtTelephone.Text = model.Telephone; } }
public void ShowInfo(MemberInfo userInfo) { CompanyMemberInfo model = userInfo as CompanyMemberInfo; if (model != null) { this.txtIdCard.Text = model.IdCard; this.txtCompanyName.Text = model.CompanyName; this.ucRegion.PresetRegionInfo(model.RegionPath); this.txtMobile.Text = model.Mobile; this.txtTelephone.Text = model.Telephone; this.txtFax.Text = model.Fax; this.txtAddress.Text = model.Address; } }
public void ShowInfo(MemberInfo userInfo) { SchoolMemberInfo model = userInfo as SchoolMemberInfo; if (model != null) { this.txtDuty.Text = model.Duty.ToString(); this.txtSchoolName.Text = model.School; this.ucRegion.PresetRegionInfo(model.RegionPath); this.txtMobile.Text = model.Mobile; this.txtTelephone.Text = model.Telephone; this.txtFax.Text = model.Fax; this.txtAddress.Text = model.Address; } }
public void GetInputInfo(MemberInfo userInfo) { FamlyMemberInfo model = userInfo as FamlyMemberInfo; if (model != null) { model.IdCard = txtIdCard.Text.Trim(); model.Telephone = txtTelephone.Text.Trim(); model.Mobile = txtMobile.Text.Trim(); RegionInfo regionInfo = ucRegion.GetSelectedRegionInfo(); model.RegionPath = regionInfo.RegionPath; model.Country = regionInfo.Country; model.Province = regionInfo.Province; model.City = regionInfo.City; model.County = regionInfo.County; model.Address = txtAddress.Text.Trim(); } }
public void GetInputInfo(MemberInfo userInfo) { SchoolMemberInfo model = userInfo as SchoolMemberInfo; if (model != null) { model.School = txtSchoolName.Text.Trim(); model.Duty = txtDuty.Text.Trim(); model.Telephone = txtTelephone.Text.Trim(); model.Mobile = txtMobile.Text.Trim(); model.Fax = txtFax.Text.Trim(); RegionInfo regionInfo = ucRegion.GetSelectedRegionInfo(); model.RegionPath = regionInfo.RegionPath; model.Country = regionInfo.Country; model.Province = regionInfo.Province; model.City = regionInfo.City; model.County = regionInfo.County; model.Address = txtAddress.Text.Trim(); } }
/// <summary> /// 对象实体绑定数据 /// </summary> private MemberInfo ReaderBind(IDataReader dataReader) { MemberInfo model = new MemberInfo(); object ojb; model.UserId = dataReader["UserId"].ToString(); model.UserEmail = dataReader["UserEmail"].ToString(); model.Password = dataReader["Password"].ToString(); model.UserName = dataReader["UserName"].ToString(); ojb = dataReader["AllScore"]; if (ojb != null && ojb != DBNull.Value) { model.AllScore = (int)ojb; } ojb = dataReader["CurScore"]; if (ojb != null && ojb != DBNull.Value) { model.CurScore = (int)ojb; } ojb = dataReader["LastLogin"]; if (ojb != null && ojb != DBNull.Value) { model.LastLogin = (DateTime)ojb; } model.LoginIp = dataReader["LoginIP"].ToString(); ojb = dataReader["RegisterTime"]; if (ojb != null && ojb != DBNull.Value) { model.RegisterTime = (DateTime)ojb; } ojb = dataReader["ModifyTime"]; if (ojb != null && ojb != DBNull.Value) { model.ModifyTime = (DateTime)ojb; } ojb = dataReader["UserType"]; if (ojb != null && ojb != DBNull.Value) { model.UserType = (MemberType)(Convert.ToInt32(ojb)); } ojb = dataReader["status"]; if (ojb != null && ojb != DBNull.Value) { model.Status = (MemberStatus)(Convert.ToInt32(ojb)); } ojb = dataReader["userLevel"]; if (ojb != null && ojb != DBNull.Value) { model.UserLevel = (UserLevel)(Convert.ToInt32(ojb)); } model.SecPassword = dataReader["SecPassword"].ToString(); return model; }
public static MemberInfo GetBaseInfo(string userId) { Database db = NoName.NetShop.Common.CommDataAccess.DbReader; DbCommand dbCommand = db.GetStoredProcCommand("UP_umMember_GetModel"); db.AddInParameter(dbCommand, "UserId", DbType.String,userId); MemberInfo model = null; using (IDataReader dataReader = db.ExecuteReader(dbCommand)) { if (dataReader.Read()) { MemberInfo mbll = new MemberInfo(); model = mbll.ReaderBind(dataReader); } } return model; }