Ejemplo n.º 1
0
        private void btnaddsubject_Click(object sender, EventArgs e)
        {
            if (txtsubject.Text == string.Empty || txtinstructor.Text == string.Empty || txttotal.Text == string.Empty || txtsub_t.Text == string.Empty)
            {
                MessageBox.Show("رجاءا ادخل جميع البيانات ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            BL.CLS_Subject sub = new BL.CLS_Subject();
            sub.UpdateSubjects(this.Id, txtsubject.Text, sub.GetDeptFrmSubject(this.Id), sub.GetLevFrmSubject(this.Id), sub.GetSemFrmSubject(this.Id), txtinstructor.Text, Convert.ToInt32(txttotal.Text), Convert.ToInt32(txtsub_t.Text));
            MessageBox.Show("تم تعديل المادة بنجاح ", "تعديل المادة", MessageBoxButtons.OK, MessageBoxIcon.Information);
            txtsubject.Clear();
            txtsubject.Focus();
        }
Ejemplo n.º 2
0
        private void btnaddsubject_Click(object sender, EventArgs e)
        {
            if (txtsubject.Text == string.Empty || ComboBox1.Text == string.Empty || cmbLevel.Text == string.Empty || cmbSem.Text == string.Empty || txtinstructor.Text == string.Empty || txttotal.Text == string.Empty || txtsub_t.Text == string.Empty)
            {
                MessageBox.Show("رجاءا ادخل جميع البيانات ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }



            BL.CLS_Subject sub = new BL.CLS_Subject();
            sub.add_subjects(txtsubject.Text, Convert.ToInt32(ComboBox1.SelectedValue), Convert.ToInt32(cmbLevel.SelectedValue), Convert.ToInt32(cmbSem.SelectedValue), txtinstructor.Text, Convert.ToInt32(txttotal.Text), Convert.ToInt32(txtsub_t.Text));

            MessageBox.Show("تم اضافةالمادة بنجاح بنجاح", "اضافة مادة جديدة", MessageBoxButtons.OK, MessageBoxIcon.Information);

            txtsubject.Clear();
            txtsubject.Focus();
        }