示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (Insurancebox.SelectedItem == null)
            {
                if (Insurancebox.Text == "")
                {
                }
                else
                {
                    // add to database
                }
            }
            if (CityBox.SelectedItem == null)
            {
                if (CityBox.Text == "")
                {
                }
                else
                {
                    // add to database
                }
            }
            if (RegionBox.SelectedItem == null)
            {
                if (RegionBox.Text == "")
                {
                }
                else
                {
                    // add to database
                }
            }
            if (DoctorBox.SelectedItem == null)
            {
                if (RegionBox.Text == "")
                {
                }
                else
                {
                    // add to database
                }
            }

            patient = new Patient();
            int id = -1;

            if (patient.ImportPatient(this))
            {
                id = patient.AddPatient();
            }

            PI.Name_Patient.SelectedValueChanged -= PI.Name_Patient_SelectedValueChanged1;
            MyFunction.FillComboBox(PI.Name_Patient, PatientInfo.GetPatients(), "اسم", "الرمز");
            PI.Name_Patient.SelectedValueChanged += PI.Name_Patient_SelectedValueChanged1;

            PI.Name_Patient.SelectedValue = id;
            this.Dispose();
        }
示例#2
0
        private void PatientInformation_Load(object sender, EventArgs e)
        {
            Name_Patient.SelectedValueChanged -= Name_Patient_SelectedValueChanged1;
            MyFunction.FillComboBox(Name_Patient, PatientInfo.GetPatients(), "اسم", "الرمز");
            Name_Patient.SelectedValueChanged += Name_Patient_SelectedValueChanged1;


            MyFunction.FillComboBox(Insurance, PatientInfo.GetInsurance(), "الجهة_الضامنة", "الرمز");
            MyFunction.FillComboBox(MedcineID, PatientInfo.GetMedicine(), "اسم", "رمز");
            MyFunction.FillComboBox(InfectionDiseases, PatientInfo.GetInfectiousDeseases(), "المرض", "الرمز");
        }