コード例 #1
0
 private void AddNew_Click(object sender, EventArgs e)
 {
     Reset();
     EN_No.Focus();
     AutoCourse();
     AutoOccupation();
     AutoCategory();
     AutoSem();
     AutoBatch();
     AutoBoard();
     AutoUniversity();
     CmdUpdate.Enabled = false;
     Save.Enabled      = true;
     Delete.Enabled    = false;
     Search.Enabled    = false;
     autoSID();
     S_ID.Enabled = false;
 }
コード例 #2
0
        private void FrmRegistration_Load(object sender, EventArgs e)
        {
            this.Top              = 78;
            this.Left             = 0;
            this.Width            = MdiParent.Width - 5;
            this.Height           = (MdiParent.Height - this.Top - 5) - 27;
            LblRegistration.Width = this.Width;
            EN_No.Focus();

            cmd             = new OleDbCommand();
            cmd.Connection  = con;
            cmd.CommandText = "SELECT (S_ID) FROM Student";
            dr = cmd.ExecuteReader();
            while (dr.Read())
            {
                S_ID.Items.Add(dr.GetValue(0));
            }
            dr.Close();
        }
コード例 #3
0
 private bool Verification()
 {
     if (EN_No.Text == "G")
     {
         EN_No.Focus();
         string errorEnrollmentNumber = "Please Provide Enrollment Number";
         errorPro.SetError(EN_No, errorEnrollmentNumber);
         MessageBox.Show("Please Provide Enrollment Number");
         return(false);
     }
     if (C_Name.Text == string.Empty)
     {
         C_Name.Focus();
         string errorCousrse = "Please Choose Course";
         errorPro.SetError(C_Name, errorCousrse);
         return(false);
     }
     if (C_Sem.Text == string.Empty)
     {
         C_Sem.Focus();
         string errorSemester = "Please Choose Semester";
         errorPro.SetError(C_Sem, errorSemester);
         MessageBox.Show("Please Choose Semester");
         return(false);
     }
     if (Batch.Text == string.Empty)
     {
         Batch.Focus();
         string errorBatch = "Please Choose Batch";
         errorPro.SetError(Batch, errorBatch);
         return(false);
     }
     if (S_FName.Text == string.Empty)
     {
         S_FName.Focus();
         string errorFname = "Please Provide First Name";
         errorPro.SetError(S_FName, errorFname);
         MessageBox.Show("Please Provide First Name");
         return(false);
     }
     if (DOB.Text == string.Empty)
     {
         DOB.Focus();
         string errorDOB = "Please Provide Date Of Birth";
         errorPro.SetError(DOB, errorDOB);
         return(false);
     }
     if (Father.Text == string.Empty)
     {
         Father.Focus();
         string errorFather = "Please Provide Father Name";
         errorPro.SetError(Father, errorFather);
         return(false);
     }
     if (MtxtFContact.Text == "+91-")
     {
         MtxtFContact.Focus();
         string errorMtxtFContact = "Please Provide Father Contact Number";
         errorPro.SetError(MtxtFContact, errorMtxtFContact);
         return(false);
     }
     return(true);
 }