Ejemplo n.º 1
0
 private void addTown_Click(object sender, EventArgs e)
 {
     addData townAdd = new addData();
     townAdd.setType(addData.formType.TOWNS, addData.formAction.ADD);
     townAdd.setRegionID(this.region.Text);
     townAdd.ShowDialog();
     getTown();
 }
Ejemplo n.º 2
0
 private void buttonAddLPZ_Click(object sender, EventArgs e)
 {
     addData lpzAdd = new addData();
     lpzAdd.setType(addData.formType.LPZ, addData.formAction.ADD);
     lpzAdd.ShowDialog();
     LPZ.DataSource = Data.getLPZ();
     LPZ.DisplayMember = "title";
 }
Ejemplo n.º 3
0
 private void addRegion_Click(object sender, EventArgs e)
 {
     addData regionAdd = new addData();
     regionAdd.setType(addData.formType.REGIONS, addData.formAction.ADD);
     regionAdd.ShowDialog();
 }
Ejemplo n.º 4
0
        private void modifyButton_Click(object sender, EventArgs e)
        {
            addData modifyData = new addData();
            switch (formType)
            {
                case formTypes.DEPARTMENTS:
                    modifyData.setType(addData.formType.DEPARTMENTS, addData.formAction.MODIFY);
                    modifyData.setDataToUpdate(dataGridView1.CurrentRow.Cells[0].Value.ToString(),"");
                    modifyData.ShowDialog();
                    gridInit();
                    break;
                case formTypes.DIAGNOSE:

                    modifyData.setType(addData.formType.DIAGNOSE, addData.formAction.MODIFY);

                    modifyData.setDataToUpdate(dataGridView1.CurrentRow.Cells[0].Value.ToString(), dataGridView1.CurrentRow.Cells[1].Value.ToString(),Convert.ToBoolean(dataGridView1.CurrentRow.Cells[2].Value));
                    modifyData.ShowDialog();
                    gridInit();
                    break;
                case formTypes.DOCTORS:
                    modifyData.setType(addData.formType.DOCTORS, addData.formAction.MODIFY);
                    modifyData.setDataToUpdate(dataGridView1.CurrentCell.Value.ToString(), "");
                    modifyData.ShowDialog();
                    gridInit();
                    break;
                case formTypes.INFERENCELKK:
                    modifyData.setType(addData.formType.INFERENCELKK, addData.formAction.MODIFY);
                    modifyData.setDataToUpdate(dataGridView1.CurrentCell.Value.ToString(), "");
                    modifyData.ShowDialog();
                    gridInit();
                    break;
                case formTypes.REGIONS:
                    modifyData.setType(addData.formType.REGIONS, addData.formAction.MODIFY);
                    modifyData.setDataToUpdate(dataGridView1.CurrentCell.Value.ToString(), "");
                    modifyData.ShowDialog();
                    gridInit();
                    break;
            }
        }
Ejemplo n.º 5
0
 private void insertButton_Click(object sender, EventArgs e)
 {
     addData dataAdd = new addData();
     switch (formType)
     {
         case formTypes.DEPARTMENTS:
             dataAdd.setType(addData.formType.DEPARTMENTS, addData.formAction.ADD);
             dataAdd.ShowDialog();
             gridInit();
             break;
         case formTypes.DIAGNOSE:
             dataAdd.setType(addData.formType.DIAGNOSE, addData.formAction.ADD);
             dataAdd.ShowDialog();
             gridInit();
             break;
         case formTypes.DOCTORS:
             dataAdd.setType(addData.formType.DOCTORS, addData.formAction.ADD);
             dataAdd.ShowDialog();
             gridInit();
             break;
         case formTypes.INFERENCELKK:
             dataAdd.setType(addData.formType.INFERENCELKK, addData.formAction.ADD);
             dataAdd.ShowDialog();
             gridInit();
             break;
         case formTypes.REGIONS:
             dataAdd.setType(addData.formType.REGIONS, addData.formAction.ADD);
             dataAdd.ShowDialog();
             gridInit();
             break;
     }
 }
Ejemplo n.º 6
0
 private void addDepartment_Click(object sender, EventArgs e)
 {
     addData departmentAdd = new addData();
     departmentAdd.setType(addData.formType.DEPARTMENTS, addData.formAction.ADD);
     departmentAdd.ShowDialog();
 }
Ejemplo n.º 7
0
 private void addDoctor_Click(object sender, EventArgs e)
 {
     addData doctorAdd = new addData();
     doctorAdd.setType(addData.formType.DOCTORS, addData.formAction.ADD);
     doctorAdd.ShowDialog();
     doctor.DataSource = lkkData.getDoctors();
     doctor.DisplayMember = "fio";
 }