private void pictureBox1_Click(object sender, EventArgs e)
        {
            Home_form home = new Home_form();

            home.Show();
            this.Hide();
        }
예제 #2
0
        private void Login_button_Click(object sender, EventArgs e)
        {
            try
            {
                if (User_name_textBox.Text != "" && Password_textBox.Text != "")
                {
                    Digital_library_entity information = new Digital_library_entity();

                    information.User_name = User_name_textBox.Text;
                    information.Password  = Password_textBox.Text;

                    Digital_library_bl LibraryBL = new Digital_library_bl();

                    if (LibraryBL.checkinformation(information))
                    {
                        //MessageBox.Show("Entry Successfull");
                        Home_form home = new Home_form();
                        home.Show();
                        this.Hide();
                        // clear();
                    }
                    else
                    {
                        MessageBox.Show("Invalid user name or password!!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #3
0
        private void Save_button_Click(object sender, EventArgs e)
        {
            try
            {
                if (Book_ID_textBox.Text != "" && Book_Name_textBox.Text != "" && Author_textBox.Text != "" && Quantity_textBox.Text != "" && Category_textBox.Text != "")
                {
                    Digital_library_entity information = new Digital_library_entity();

                    information.Book_Name    = Book_Name_textBox.Text;
                    information.Author       = Author_textBox.Text;
                    information.Category     = Category_textBox.Text;
                    information.Quantity     = Quantity_textBox.Text;
                    information.Serial_No    = Book_ID_textBox.Text;
                    information.Arrival_Date = Arrival_Date_textBox.Text;

                    Digital_library_bl LibraryBL = new Digital_library_bl();

                    if (LibraryBL.Entry_book(information))
                    {
                        MessageBox.Show("Entry Successfull");
                        Home_form home = new Home_form();
                        home.Show();
                        this.Hide();
                        // clear();
                    }
                    else
                    {
                        MessageBox.Show("Wrong Entry!!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void Save_button_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox_student_ID.Text != "" && textBox1_name.Text != "" && textBox2_disciplene.Text != "" && textBox3_batch.Text != "" && textBox4_contact_no.Text != "" && textBox5_homeDistrict.Text != "")
                {
                    Digital_library_entity information = new Digital_library_entity();

                    information.Discipline    = textBox2_disciplene.Text;
                    information.Student_ID    = textBox_student_ID.Text;
                    information.Batch         = textBox3_batch.Text;
                    information.Student_name  = textBox1_name.Text;
                    information.Contact_no    = textBox4_contact_no.Text;
                    information.home_district = textBox5_homeDistrict.Text;

                    Digital_library_bl LibraryBL = new Digital_library_bl();

                    if (LibraryBL.Entry_student(information))
                    {
                        MessageBox.Show("Entry Successfull");
                        Home_form home = new Home_form();
                        home.Show();
                        this.Hide();
                        // clear();
                    }
                    else
                    {
                        MessageBox.Show("Wrong Entry!!");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }