private bool DoEdit(int _id) { bool result = false; BLL.t_customer bll = new BLL.t_customer(); Model.t_customer model = bll.GetModel(_id); model.ID = _id; model.CustomerType = Convert.ToInt32(ddl_CustomerType.SelectedValue); model.TrueName = txt_TrueName.Text; model.Wechat = txt_Wechat.Text; model.Nickname = txt_Nickname.Text; model.Gender = Convert.ToInt32(ddl_Gender.SelectedValue); model.AvatarUrl = img_AvatarUrl.ImageUrl; model.PhoneNumber = txt_PhoneNumber.Text; model.Country = txt_Country.Text; model.Province = txt_Province.Text; model.City = txt_City.Text; model.NativePlace = txt_NativePlace.Text; model.Height = Convert.ToDecimal(txt_Height.Text); model.Birthday = txt_Birthday.Text == "" ? DateTime.Now : Convert.ToDateTime(txt_Birthday.Text); model.LastModificationTime = DateTime.Now; if (bll.Update(model)) { //AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改管理员:" + model.user_name); //记录日志 result = true; } return(result); }