public static void getAllTables() { FormBooking.getTableBooking(); FormBooks.getTableBook(); FormDepartment.getTableDepartment(); FormIssuingBooks.getTableIssuingBooks(); FormReaders.getTableReaders(); }
private void button1_Click(object sender, EventArgs e) { string info = String.Format("Книга - {0} \nОтдел - {1} \nЧитатель - {2} \nСрок выдачи - 14 дней \nНеобходимо вернуть книгу до {3}", selectBook, comboBoxDepartment.SelectedItem, comboBoxReaders.SelectedItem.ToString(), DateTime.Now.AddDays(daysIssuing).ToLongDateString()); DialogResult result = MessageBox.Show(info, "Подтверждение", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); if (result == DialogResult.OK) { int count = DBAction.libraryDS.Tables["issuing_books"].Rows.Count + 1; DBAction.libraryDS.Tables["issuing_books"].Rows.Add(count, Convert.ToInt32(comboBoxReaders.SelectedItem), Convert.ToInt32(cipherBook), DateTime.Now, DateTime.Now.AddDays(daysIssuing), comboBoxDepartment.SelectedIndex + 1); var f = new FormIssuingBooks(); f.dataAdapterCommand(); //f.setInsertCommand(cipherBook, Authorization.nameUser, DateTime.Now.ToLongDateString(), (comboBoxDepartment.SelectedIndex + 1).ToString()); this.Close(); FormBooks f1 = new FormBooks(); f1.Show(); } }
private void buttonListOutBooks_Click(object sender, EventArgs e) { var form = new FormIssuingBooks(); form.ShowDialog(); }