Esempio n. 1
0
 void addMedicForm_MedicAddEvent(object sender, MedicIdentityEventArgs e)
 {
     var medicAttributesArray = new string[] { e.Id, e.Surname, e.Name, e.Patronymic, e.Profession, e.Category, e.Degree, e.Department };
     var medicItem = new ListViewItem(medicAttributesArray);
     medicList.Items.Add(medicItem);
     medicItem.Group = medicList.Groups[e.Profession];
     medicItem.EnsureVisible();
     medicItem.Selected = true;
     medicList.Focus();
 }
Esempio n. 2
0
 private void AddNewMedic()
 {
     var newMedic = new Medic();
     var medicCollection = ServerConnection.GetCollection<Medic>();
     FillMedicObjectWithInfo(newMedic);
     medicCollection.Save<Medic>(newMedic);
     //TODO: get rid of this disaster
     var medicArgs = new MedicIdentityEventArgs(newMedic.Id.ToString(), newMedic.Surname, newMedic.Name, newMedic.Patronymic, newMedic.Profession, newMedic.Category, newMedic.Degree, newMedic.Department);
     MedicAddEvent(this, medicArgs);
 }
Esempio n. 3
0
        void addMedicForm_MedicAddEvent(object sender, MedicIdentityEventArgs e)
        {
            var medicAttributesArray = new string[] { e.Id, e.Surname, e.Name, e.Patronymic, e.Profession, e.Category, e.Degree, e.Department };
            var medicItem            = new ListViewItem(medicAttributesArray);

            medicList.Items.Add(medicItem);
            medicItem.Group = medicList.Groups[e.Profession];
            medicItem.EnsureVisible();
            medicItem.Selected = true;
            medicList.Focus();
        }
Esempio n. 4
0
        private void AddNewMedic()
        {
            var newMedic        = new Medic();
            var medicCollection = ServerConnection.GetCollection <Medic>();

            FillMedicObjectWithInfo(newMedic);
            medicCollection.Save <Medic>(newMedic);
            //TODO: get rid of this disaster
            var medicArgs = new MedicIdentityEventArgs(newMedic.Id.ToString(), newMedic.Surname, newMedic.Name, newMedic.Patronymic, newMedic.Profession, newMedic.Category, newMedic.Degree, newMedic.Department);

            MedicAddEvent(this, medicArgs);
        }