Ejemplo n.º 1
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);
 }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 private void FillMedicObjectWithInfo(Medic medic)
 {
     medic.Surname     = tbSurname.Text;
     medic.Name        = tbName.Text;
     medic.Patronymic  = tbPatronymic.Text;
     medic.DateOfBirth = dtpBirthDate.GetNullOrValue();
     medic.Profession  = cbProfessions.Text;
     medic.Category    = cbCategory.Text;
     medic.Degree      = cbDegree.Text;
     medic.Department  = cbDepartment.Text;
     if (String.IsNullOrWhiteSpace(tbCabinet.Text))
     {
         medic.Cabinet = null;
     }
     else
     {
         medic.Cabinet = int.Parse(tbCabinet.Text);
     }
     medic.IsWorking = chbIsWorking.Checked;
 }
Ejemplo n.º 4
0
 private void FillMedicObjectWithInfo(Medic medic)
 {
     medic.Surname = tbSurname.Text;
     medic.Name = tbName.Text;
     medic.Patronymic = tbPatronymic.Text;
     medic.DateOfBirth = dtpBirthDate.GetNullOrValue();
     medic.Profession = cbProfessions.Text;
     medic.Category = cbCategory.Text;
     medic.Degree = cbDegree.Text;
     medic.Department = cbDepartment.Text;
     if(String.IsNullOrWhiteSpace(tbCabinet.Text))
     {
         medic.Cabinet = null;
     }
     else
     {
         medic.Cabinet = int.Parse(tbCabinet.Text);
     }
     medic.IsWorking = chbIsWorking.Checked;
 }