Exemple #1
0
        private void ShowLike()
        {
            DrPatientClass grid = new DrPatientClass();
            DataTable      dt   = grid.SearchByName();

            if (dt == null)
            {
                grdPatients.Columns.Clear();
            }
            else
            {
                grdPatients.DataSource = dt;
            }
            grdPatients.CurrentCell = null;
        }
Exemple #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            DrPatientClass del = new DrPatientClass();
            string         pid = txtPID.Text;

            del.DelProc(pid);
            //normalView();
            ClearTextFields();
            DisableTexts();
            ShowAll();
            btnPayment.Enabled = false;
            btnEdit.Enabled    = false;
            btnAdd.Enabled     = true;
            btnDelete.Enabled  = false;
        }
Exemple #3
0
        private void UpdatePatient()
        {
            int            pID           = ID;
            string         name          = txtName.Text;
            string         age           = txtAge.Text;
            string         address       = txtAddress.Text;
            string         gender        = txtGender.Text;
            int            contactNo     = Convert.ToInt32(txtContactNo.Text);
            string         dob           = txtDOB.Text;
            DateTime       date          = Convert.ToDateTime(txtDOB.Text);
            string         bloodGroup    = txtBloodGroup.Text;
            string         healthProblem = txtHealth.Text;
            Image          image         = picProfile.Image;
            DrPatientClass pClass        = new DrPatientClass();

            pClass.UpdatePatient(pID, name, age, address, gender, contactNo, dob, bloodGroup, healthProblem, image);
        }
Exemple #4
0
        private void ShowAll()
        {
            //author: enzo
            //this method displays all data in grdpatient(gridview) when called
            DrPatientClass grid = new DrPatientClass();
            DataTable      dt   = grid.GetAll();

            if (dt == null)
            {
                grdPatients.Columns.Clear();
            }
            else
            {
                grdPatients.DataSource = dt;
            }
            grdPatients.CurrentCell = null;
            ArrangeGridColumns();
        }