private void btnChose_Click(object sender, EventArgs e) { if (m_listBookObject.Count != 0) { txtBookId.Text = m_listBookObject["MaSach"].ToString(); txtBookName.Text = m_listBookObject["TenSach"].ToString(); txtBookGenre.Text = m_listBookObject["TenTL"].ToString(); txtPublisherName.Text = m_listBookObject["TenNXB"].ToString(); txtAuthorName.Text = m_listBookObject["NhomTG"].ToString(); spPrices.EditValue = m_DeliveryNoteDetailExecute.convertPrice(decimal.Parse(m_listBookObject["GiaNhap"].ToString())); ppControlDeliveryNote.HidePopup(); } }
private void choseBookAddDelivery() { try { if (m_listBookObject.Count != 0) { txtBookId.Text = m_listBookObject["MaSach"].ToString(); txtBookName.Text = m_listBookObject["TenSach"].ToString(); txtBookGenre.Text = m_listBookObject["TenTL"].ToString(); txtPublisherName.Text = m_listBookObject["TenNXB"].ToString(); txtAuthorName.Text = m_listBookObject["NhomTG"].ToString(); lblSoLuongMax.Text = "Số lượng <= " + m_DeliveryNoteDetailExecute.getCountBookMaxCanSale(txtBookId.Text); lblSoLuongMax.ForeColor = Color.Red; spPrices.EditValue = m_DeliveryNoteDetailExecute.convertPrice(decimal.Parse(m_listBookObject["GiaNhap"].ToString())); ppControlDeliveryNote.HidePopup(); } } catch (System.Exception) { } finally { updateEnableButtonAndResetValueOfControl(ref btnChose); } }