public DTO.AccountDTO Create(DTO.AccountDTO dto) { var model = base.Create <AccountDTO, Account>(dto , _IAccountRepository , dtoAction => {}); return(model); }
private void textBox_Search_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (label_Error_Search.Visible == true && label_Error_Search.Text == "Tài khoản chỉ gồm chữ và số!") { return; } DTO.AccountDTO userTarget = AccountBUS.Instance.GetAccountByUserName(textBox_Search.Text); if (userTarget != null) { byte[] byteArrayIn = AccountBUS.Instance.LoadImage(userTarget.ID); using (var ms = new MemoryStream(byteArrayIn)) { pictureBox_UserPic.Image = Image.FromStream(ms); } if (userTarget.ID == father.LoginAccount.ID) { label_Search_Name.Text = "Là bạn đó ahihi ^^"; } else { label_Search_Name.Text = "Name: " + userTarget.DisplayName; } label_Search_Name.TextAlign = ContentAlignment.MiddleCenter; label_Search_Name.Visible = true; pictureBox_UserPic.Visible = true; } else { label_Error_Search.Text = "Tài khoản không tồn tại!"; label_Error_Search.Visible = true; } } }