private void btnOK_Click(object sender, EventArgs e) { LendBook lb = (LendBook)this.Owner; lb.cboMemberID.Text = dataGridViewShowMembers.CurrentRow.Cells[0].Value.ToString(); lb.txtMemberName.Text = dataGridViewShowMembers.CurrentRow.Cells[1].Value.ToString(); lb.lblBookLent.Text = dataGridViewShowMembers.CurrentRow.Cells[4].Value.ToString(); this.Close(); }
private void btnOK_Click(object sender, EventArgs e) { Book b = new Book(); LendBook lb = (LendBook)this.Owner; lb.cboISBN.Text = dataGridViewShowBooks.CurrentRow.Cells[0].Value.ToString(); lb.txtTitle.Text = dataGridViewShowBooks.CurrentRow.Cells[1].Value.ToString(); string totalQty = dataGridViewShowBooks.CurrentRow.Cells[3].Value.ToString(); string totalOnLoan = dataGridViewShowBooks.CurrentRow.Cells[4].Value.ToString(); int remained = Convert.ToInt32(totalQty) - Convert.ToInt32(totalOnLoan); lb.lblBookRemained.Text = remained.ToString(); this.Close(); }
public Search() { bro = new LendBook(); context = new Entities(); InitializeComponent(); }
private void button6_Click(object sender, EventArgs e) { LendBook lb = new LendBook(); lb.Show(); }