示例#1
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (textBox5.Text != "")
            {
                rad = new radioLoad();
                rbc = new returnBookClass();
                string query = "select studentID,studentName, titleBook,authorBook,placeLibrary,conditionBook from  IssueBooks INNER JOIN addingBooks on  addingBooks.serialNo = IssueBooks.bookID where studentID = " + textBox5.Text;

                dataGridView1.DataSource = dv.goFill(query).Tables[0];
                textBox1.Enabled         = true;
                textBox2.Enabled         = true;
                comboBox2.Enabled        = true;
                comboBox3.Enabled        = true;
                comboBox2.DataSource     = rad.mydt("select * from IssueBooks where studentID = " + textBox5.Text);
                comboBox2.DisplayMember  = "bookID";
                comboBox2.ValueMember    = "studentID";
                rbc.bookD    = comboBox2.Text;
                rbc.studentD = textBox5.Text;
            }
            else
            {
                MessageBox.Show("Enter Student ID", "Alert!!");
            }
            textBox2.Text = DateTime.Now.ToString();
        }
 private void feeUpdationBox_Load(object sender, EventArgs e)
 {
     rad = new radioLoad();
     comboBox1.DataSource    = rad.mydt("select * from monthNames");
     comboBox1.DisplayMember = "title";
     comboBox1.ValueMember   = "ID";
 }
示例#3
0
        private void loginAuthentication_Load(object sender, EventArgs e)
        {
            radioLoad rl = new radioLoad();

            comboBox1.DataSource    = rl.mydt("select * from workCategories");
            comboBox1.DisplayMember = "title";
            comboBox1.ValueMember   = "ID";
        }
示例#4
0
        private void checkingStudentFees_Load(object sender, EventArgs e)
        {
            rl = new radioLoad();

            comboBox1.DataSource    = rl.mydt("select * from monthNames");
            comboBox1.DisplayMember = "title";
            comboBox1.ValueMember   = "ID";
        }
示例#5
0
        private void renewBook_Load(object sender, EventArgs e)
        {
            radioLoad rad = new radioLoad();

            comboBox1.DataSource    = rad.mydt("select * from libraryMembershipForm");
            comboBox1.DisplayMember = "registrationNo";
            comboBox1.ValueMember   = "registrationNo";
        }
        private void libraryMemberShip_Load(object sender, EventArgs e)
        {
            radioLoad rad = new radioLoad();

            comboBox1.DataSource    = rad.mydt("select * from studentDetails");
            comboBox1.DisplayMember = "registrationNo";
            comboBox1.ValueMember   = "registrationNo";
            textBox2.Text           = booksTaken.ToString();
            textBox3.Text           = maxAllowed.ToString();
        }
示例#7
0
        private void employeeSalaryInformation_Load(object sender, EventArgs e)
        {
            radioLoad rad = new radioLoad();

            comboBox1.DataSource    = rad.mydt("select * from employeeBoxData");
            comboBox1.DisplayMember = "Id";
            comboBox1.ValueMember   = "Id";

            dg.query = "select * from employeePayments";
            dataGridView1.DataSource = dg.goFill().Tables[0];
        }
示例#8
0
        private void button1_Click(object sender, EventArgs e)
        {
            dg = new datagridVeiwWorking();
            rb = new returnBookClass();
            radioLoad rad = new radioLoad();

            dg.query = "SELECT studentID,studentName,serialNo,titleBook,authorBook FROM addingBooks INNER JOIN IssueBooks ON addingBooks.serialNo = IssueBooks.bookID where studentID=" + comboBox1.Text;
            dataGridView1.DataSource = dg.goFill().Tables[0];
            comboBox2.DataSource     = rad.mydt("select * from IssueBooks where studentID = " + comboBox1.Text);
            comboBox2.DisplayMember  = "bookID";
            comboBox2.ValueMember    = "studentID";
        }
        private void addingNewBook_Load(object sender, EventArgs e)
        {
            textBox1.Enabled         = false;
            dataGridView1.DataSource = goFill().Tables[0];
            qc = new QueriesClass();
            string strSQL = "SELECT MAX(serialNo) as 'LastID' FROM addingBooks";

            textBox1.Text = qc.GetLastID(strSQL).ToString();
            radioLoad rl = new radioLoad();

            comboBox1.DataSource    = rl.mydt("select * from shelvesLibrary");
            comboBox1.DisplayMember = "titleShelves";
            comboBox1.ValueMember   = "ID";
        }
        private void humanResources_Load(object sender, EventArgs e)
        {
            radioLoad rad = new radioLoad();

            comboBox2.DataSource    = rad.mydt("select * from categoriesFields");
            comboBox2.DisplayMember = "title";
            comboBox2.ValueMember   = "ID";

            comboBox1.DataSource    = rad.mydt("select * from qualification");
            comboBox1.DisplayMember = "title";
            comboBox1.ValueMember   = "ID";

            comboBox4.DataSource    = rad.mydt("select * from payScales");
            comboBox4.DisplayMember = "title";
            comboBox4.ValueMember   = "ID";
        }
示例#11
0
        private void studentFeeCollection_Load(object sender, EventArgs e)
        {
            textBox1.Enabled = false;

            dataGridView1.DataSource = sd.tableData("select * from studentFees");

            rl = new radioLoad();

            comboBox3.DataSource    = rl.mydt("select * from monthNames");
            comboBox3.DisplayMember = "title";
            comboBox3.ValueMember   = "ID";

            comboBox1.DataSource    = rl.mydt("select * from studentDetails");
            comboBox1.DisplayMember = "registrationNo";
            comboBox1.ValueMember   = "registrationNo";
        }
示例#12
0
        private void employeeSalaries_Load(object sender, EventArgs e)
        {
            radioLoad rad = new radioLoad();

            comboBox1.DataSource    = rad.mydt("select * from employeeBoxData");
            comboBox1.DisplayMember = "Id";
            comboBox1.ValueMember   = "Id";

            comboBox2.DataSource    = rad.mydt("select * from monthNames");
            comboBox2.DisplayMember = "title";
            comboBox2.ValueMember   = "ID";
            textBox1.Enabled        = false;
            textBox2.Enabled        = false;
            textBox2.Text           = DateTime.Now.ToShortDateString();
            dg.query = "SELECT * from employeePayments";
            dataGridView1.DataSource = dg.goFill().Tables[0];
        }
示例#13
0
        private void addmisionDepart_Load(object sender, EventArgs e)
        {
            textBox1.Enabled = false;
            textBox3.Enabled = false;

            qc                      = new QueriesClass();
            textBox1.Text           = qc.returnRollNumber().ToString();
            rad                     = new radioLoad();
            aq                      = new AdmissionQueries();
            textBox3.Text           = aq.limitSeats();
            comboBox1.DataSource    = rad.mydt("select * from categoriesFields");
            comboBox1.DisplayMember = "title";
            comboBox1.ValueMember   = "ID";
            comboBox4.DataSource    = rad.mydt("select * from bloodGroups");
            comboBox4.DisplayMember = "title";
            comboBox4.ValueMember   = "ID";
        }
示例#14
0
        private void employeeBox_Load(object sender, EventArgs e)
        {
            qc = new QueriesClass();
            string strSQL = "SELECT MAX(Id) as 'LastID' FROM employeeBoxData";

            textBox1.Text = qc.GetLastID(strSQL).ToString();


            radioLoad rad = new radioLoad();

            comboBox1.DataSource    = rad.mydt("select * from workCategories");
            comboBox1.DisplayMember = "title";
            comboBox1.ValueMember   = "ID";
            comboBox2.DataSource    = rad.mydt("select * from payScales");
            comboBox2.DisplayMember = "gradeNo";
            comboBox2.ValueMember   = "ID";
        }
        private void issueBook_Load(object sender, EventArgs e)
        {
            // dataGridView1.DataSource = dg.goFill().Tables[0];
            radioLoad rad = new radioLoad();

            comboBox1.DataSource    = rad.mydt("select * from libraryMembershipForm");
            comboBox1.DisplayMember = "registrationNo";
            comboBox1.ValueMember   = "registrationNo";

            comboBox2.DataSource    = rad.mydt("select * from addingBooks");
            comboBox2.DisplayMember = "serialNo";
            comboBox2.ValueMember   = "serialNo";
            li = new library();


            textBox3.Text = limit.ToString();
            textBox4.Text = DateTime.Now.ToShortDateString();
            textBox5.Text = DateTime.Now.AddDays(15).ToShortDateString();
        }
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox2.SelectedIndex == 0)
            {
                radioLoad rad = new radioLoad();

                comboBox3.DataSource    = rad.mydt("select * from artsCourses");
                comboBox3.DisplayMember = "title";
                comboBox3.ValueMember   = "ID";
            }
            else if (comboBox2.SelectedIndex == 1)
            {
                radioLoad rad = new radioLoad();

                comboBox3.DataSource    = rad.mydt("select * from businessCourses");
                comboBox3.DisplayMember = "title";
                comboBox3.ValueMember   = "ID";
            }
            else if (comboBox2.SelectedIndex == 2)
            {
                radioLoad rad = new radioLoad();

                comboBox3.DataSource    = rad.mydt("select * from engeneringCourses");
                comboBox3.DisplayMember = "title";
                comboBox3.ValueMember   = "ID";
            }
            else if (comboBox2.SelectedIndex == 3)
            {
                radioLoad rad = new radioLoad();

                comboBox3.DataSource    = rad.mydt("select * from medicalCourses");
                comboBox3.DisplayMember = "title";
                comboBox3.ValueMember   = "ID";
            }
            else if (comboBox2.SelectedIndex == 4)
            {
                radioLoad rad = new radioLoad();

                comboBox3.DataSource    = rad.mydt("select * from compulsoryCourses");
                comboBox3.DisplayMember = "title";
                comboBox3.ValueMember   = "ID";
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "" || textBox2.Text != "" || textBox3.Text != "" || textBox4.Text != "" || textBox5.Text != "")
            {
                ad = new QueriesClass();
                radioLoad rl = new radioLoad();
                if (radioButton4.Checked)
                {
                    gender = "Male";
                }
                else if (radioButton5.Checked)
                {
                    gender = "Female";
                }
                if (radioButton6.Checked)
                {
                    mess = "Yes";
                }
                else if (radioButton7.Checked)
                {
                    mess = "No";
                }

                ad.FirstName = textBox1.Text;
                ad.LastName  = textBox2.Text;

                ad.FatherName = textBox3.Text;
                ad.Cnic       = textBox4.Text;
                ad.Gender     = gender;

                ad.PhoneNumber   = textBox5.Text;
                ad.Qualification = comboBox1.Text;

                ad.EmailAddress = textBox6.Text;

                ad.Address       = richTextBox1.Text;
                ad.Categories    = comboBox2.Text;
                ad.Subject       = comboBox3.Text;
                ad.payScl        = Convert.ToInt32(comboBox4.Text);
                ad.DocumentCheck = mess;
                textBox1.Clear();
                textBox2.Clear();
                textBox3.Clear();
                textBox4.Clear();
                textBox5.Clear();
                textBox6.Clear();
                textBox8.Clear();
                richTextBox1.Clear();
                if (radioButton1.Checked)
                {
                    rl.radioCheck = "Employee";
                    ad.employeeRegistration();
                }
                else if (radioButton2.Checked)
                {
                    rl.radioCheck = "Faculty";
                    ad.facultyRegistration();
                    MessageBox.Show("New Faculty Member Hired!");
                }

                rl.check();
            }
            else
            {
                MessageBox.Show("Enter all values!!", "Alert!!");
            }
        }