Exemple #1
0
 public void setUpdateData(string _id)
 {
     id = _id;
     action = formActions.UPDATE;
     this.Text = "Зміна даних";
     infedenceData = lkkData.selectLKK(id);
     lkkDate.Value = Convert.ToDateTime(infedenceData.date);
     lkkNumber.Text = infedenceData.number;
     department.SelectedIndex = department.FindString(infedenceData.department);
     doctor.SelectedIndex = doctor.FindString(infedenceData.doctor);
     name.Text = infedenceData.fio;
     sex.SelectedIndex = sex.FindString(infedenceData.sex);
     yearBirth.Text = infedenceData.birth;
     age.Text = infedenceData.age;
     region.SelectedIndex = region.FindString(infedenceData.region);
     getTown();
     town.SelectedIndex = town.FindString(infedenceData.town);
     address.Text = infedenceData.address;
     work.Text = infedenceData.addressWork;
     position.Text = infedenceData.position;
     invalidity.Checked = infedenceData.haveInvalidity;
     if (infedenceData.haveInvalidity)
     {
         invalidityDate.Value = Convert.ToDateTime(infedenceData.InvalidityDate);
     }
     LPZ.SelectedIndex = LPZ.FindString(infedenceData.LPZ);
     diagnose.Text = infedenceData.diagnose;
     lkk.Text = infedenceData.lkk;
     msek.Text = infedenceData.msek;
     additions.Text = infedenceData.addition;
     mkbCode = infedenceData.mkbCode;
 }
Exemple #2
0
 public invalidityRegister()
 {
     InitializeComponent();
     action = formActions.INSERT;
     region.DataSource = Data.getRegions();
     region.DisplayMember = "title";
     LPZ.DataSource = Data.getLPZ();
     LPZ.DisplayMember = "title";
     sex.SelectedIndex = 0;
     invalidityGroupe.DataSource = Data.getInvalidityGroups();
     invalidityGroupe.DisplayMember = "groupe";
 }
Exemple #3
0
 public lkkMain()
 {
     InitializeComponent();
     action = formActions.INSERT;
     doctor.DataSource = lkkData.getDoctors();
     doctor.DisplayMember = "fio";
     region.DataSource = lkkData.getRegions();
     region.DisplayMember = "title";
     department.DataSource = lkkData.getDepartments();
     department.DisplayMember = "title";
     LPZ.DataSource = lkkData.getLPZ();
     LPZ.DisplayMember = "title";
     sex.SelectedIndex = 0;
 }
Exemple #4
0
 public void setUpdateData(string _id)
 {
     id = _id;
     action = formActions.UPDATE;
     this.Text = "Зміна даних";
     data = Data.selectinvalidity(id);
     fio.Text = data.fio;
     sex.SelectedIndex = sex.FindString(data.sex);
     birthDate.Value = data.dateBirth;
     age.Text = data.age;
     region.SelectedIndex = region.FindString(data.region);
     getTown();
     town.SelectedIndex = town.FindString(data.town);
     address.Text = data.address;
     work.Text = data.addressWork;
     position.Text = data.position;
     LPZ.SelectedIndex = LPZ.FindString(data.LPZ);
     invalidityGroupe.SelectedIndex = invalidityGroupe.FindString(data.invalidityGroupe);
     diagnose.Text = data.diagnose;
     additions.Text = data.addition;
     mkbCode = data.mkbCode;
     if (data.InvalidityDate.Date == Convert.ToDateTime("31.12.9998"))
     {
         invalidityDate.Value = DateTime.Now.Date;
         noLimit.Checked = true;
         to18yo.Checked = false;
     }
     else
         if (data.InvalidityDate.Date == data.dateBirth.AddYears(18).Date)
         {
             invalidityDate.Value = DateTime.Now.Date;
             noLimit.Checked = false;
             to18yo.Checked = true;
         }
         else
         {
             invalidityDate.Value = data.InvalidityDate.Date;
             noLimit.Checked = false;
             to18yo.Checked = false;
         }
 }
Exemple #5
0
 public void setFormActions(formActions action)
 {
     actions = action;
 }