Example #1
0
 public FrmBook_singal(Bll.ClsBooks book, string s)
 {
     InitializeComponent();
     state = s;
     b     = book;
     //    Bll.Support.FillComboBox
 }
Example #2
0
        private void BtnUpdate_Click(object sender, EventArgs e)
        {
            b = new Bll.ClsBooks(Convert.ToInt32(dgvBooks.SelectedRows[0].Cells["BookCode"].Value));
            FrmBook fb = new FrmBook(b, "update");

            fb.Show();
        }
Example #3
0
 public FrmBookChange(Bll.ClsBooks book, string s)
 {
     InitializeComponent();
     state = s;
     b     = book;
     Bll.Support.FillComboBox(txtAudience, new Bll.ClsAudienceTable().GetDataTable(), "AudienceName", "AudienceCode");
     FillFormFields();
 }
Example #4
0
 public FrmBook_singal()
 {
     InitializeComponent();
     state     = "add";
     this.Text = "הוספת ספר";
     bt        = new Bll.ClsBooksTable();
     b         = new Bll.ClsBooks();
 }
Example #5
0
 public FrmBookChange()
 {
     InitializeComponent();
     state     = "add";
     this.Text = "הוספת ספר";
     bt        = new Bll.ClsBooksTable();
     b         = new Bll.ClsBooks();
     Bll.Support.FillComboBox(txtAudience, new Bll.ClsAudienceTable().GetDataTable(), "AudienceName", "AudienceCode");
 }
Example #6
0
 public FrmBooks()
 {
     InitializeComponent();
     b  = new Bll.ClsBooks();
     bt = new Bll.ClsBooksTable();
     dgvBooks.DataSource = bt.GetDataTable();
     //dvBDetails = new DataView(bt.GetBookDetails());
     //dgvBooks.DataSource = dvBDetails;
     ChangeHeader();
 }
Example #7
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            b = new Bll.ClsBooks(Convert.ToInt32(dgvBooks.SelectedRows[0].Cells[0].Value));
            DialogResult answer = MessageBox.Show("מחיקה", "?האם אתה בטוח שהינך מעוניין למחוק ספר זה לצמיתות", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2, MessageBoxOptions.RtlReading);

            if (answer == DialogResult.Yes)
            {
                try
                {
                    b.Delete();
                    MessageBox.Show("!המחיקה בוצעה בהצלחה");
                }
                catch (Exception)
                {
                    MessageBox.Show("לא ניתן למחוק ספר זה");
                }
            }
        }
Example #8
0
 private void btnAddBook_Click(object sender, EventArgs e)
 {
     bk = new Bll.ClsBooks(Convert.ToInt32(txtNewBookCode.Text));
     //b = new Bll.ClsBorrowingBooks();//?
     //bt = new Bll.ClsBorrowingBooksTable();//?
     //bb = new Bll.ClsBookBeingBorrowed();
     //bbt = new Bll.ClsBookBeingBorrowedTable();
     if (bk.Availability == true)
     {
         ListViewItem item = new ListViewItem(new string[] { txtNewBookCode.Text, bk.BookName, Convert.ToString(b.BorrowingDate), Convert.ToString(b.AmountOfBorrowingDays), Convert.ToString(b.ReturnDate) });
         listVeiwBorrowing.Items.Add(item);
         bk.Availability = false;
     }
     else
     {
         MessageBox.Show("לא ניתן להשאיל ספר זה כי הוא כבר מושאל על ידי מישהו אחר");
         txtNewBookCode.Text = "";
     }
 }
Example #9
0
        public FrmBook(Bll.ClsBooks b, string state)
        {

        }