コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int result = 0;

            HFMS.Controls.StudentController obj = new Controls.StudentController();

            result = obj.deleteStudent(txtdel.Text);
            if (result > 0)
            {
                pnlDelete.Visible = false;
                MessageBox.Show("Done Successfully.");
            }
            else
            {
                pnlDelete.Refresh();
                MessageBox.Show("Error Occured.");
            }
        }
コード例 #2
0
 private void txtroll_LostFocus(object sender, EventArgs e)
 {
     HFMS.Controls.StudentController obj = new Controls.StudentController();
     if (txtroll.Text != null)
     {
         Student st = obj.getStudent(txtroll.Text);
         txtname.Text      = st.FirstName;
         txtlname.Text     = st.LastName;
         txtroll.Text      = st.RollNo;
         txtnic.Text       = st.CNIC;
         txtcontactno.Text = st.contact;
         txtemaill.Text    = st.Email;
         txtgnamee.Text    = st.GuardianName;
         txtgcontactt.Text = st.GuardianContact;
         txtgemaill.Text   = st.GuardianEmail;
         txtadd.Text       = st.Address;
         txtrelationn.Text = st.Relation;
         txtroom.Text      = st.RoomNo;
     }
 }