public void refreshObject(object obj) { if (obj != null && obj is DdtJournal) { DdtJournal journal = (DdtJournal)obj; deferredJournalTxt.Text = journal.Journal; deferredAdTxt.Text = journal.Ad; defferedChddTxt.Text = journal.Chdd; deferredChssTxt.Text = journal.Chss; deferredMonitorTxt.Text = journal.Monitor; deferredStartDate.Value = journal.AdmissionDate; deferredStartTime.Value = journal.AdmissionDate; DdvDoctor doc = DbDataService.GetInstance().GetDdvDoctorService().GetById(journal.Doctor); docBox.SelectedIndex = docBox.FindStringExact(doc.ShortName); objectId = journal.ObjectId; isNew = string.IsNullOrEmpty(objectId); hasChanges = false; } else { deferredJournalTxt.Text = JournalShuffleUtils.shuffleJournalText(); deferredChssTxt.SelectedIndex = JournalShuffleUtils.shuffleNextIndex(deferredChssTxt.Items.Count - 1); deferredAdTxt.SelectedIndex = JournalShuffleUtils.shuffleNextIndex(deferredAdTxt.Items.Count - 1); defferedChddTxt.SelectedIndex = defferedChddTxt.FindString("14"); } }
public void refreshObject(object obj) { if (obj != null && obj is DdtJournal) { DdtJournal journal = (DdtJournal)obj; initDateTime(journal.AdmissionDate); journalTxt.Text = journal.Journal; chddTxt.Text = journal.Chdd; adTxt.Text = journal.Ad; chssTxt.Text = journal.Chss; goodRhytmBtn0.Checked = GOOD_RHYTM.Equals(journal.Rhythm, StringComparison.Ordinal); badRhytmBtn0.Checked = !GOOD_RHYTM.Equals(journal.Rhythm, StringComparison.Ordinal); monitorTxt0.Text = journal.Monitor; objId = journal.ObjectId; freeze.Checked = journal.Freeze; isNew = string.IsNullOrEmpty(objId); hasChanges = false; isReleaseJournal = journal.ReleaseJournal; freeze.Checked = journal.Freeze; } else { initDateTime(DateTime.Now); string journalText = string.Intern(JournalShuffleUtils.shuffleJournalText()); if (isReleaseJournal) { journalText = RELEASE_JOURNAL_PREFIX + journalText + RELEASE_JOURNAL_POSTFIX; } journalTxt.Text = journalText; chddTxt.SelectedIndex = chddTxt.FindString("14"); adTxt.SelectedIndex = JournalShuffleUtils.shuffleNextIndex(adTxt.Items.Count - 1); chssTxt.SelectedIndex = JournalShuffleUtils.shuffleNextIndex(chssTxt.Items.Count - 1); goodRhytmBtn0_CheckedChanged(null, null); } }
public void refreshObject(object obj) { if (obj != null && obj is DdtJournal) { DdtJournal journal = (DdtJournal)obj; complaintsTxt.Text = journal.Complaints; adTxt.Text = journal.Ad; chddTxt.Text = journal.Chdd; chssTxt.Text = journal.Chss; monitorTxt.Text = journal.Monitor; journalTxt.Text = journal.Journal; startDateTxt.Value = journal.AdmissionDate; startTimeTxt.Value = journal.AdmissionDate; goodRhytmBtn.Checked = journal.GoodRhythm; badRhytmBtn.Checked = !journal.GoodRhythm; freeze.Checked = journal.Freeze; docBox.SelectedValue = journal.Doctor; objectId = journal.ObjectId; isNew = string.IsNullOrEmpty(objectId); hasChanges = false; } else { journalTxt.Text = journalType == (int)DdtJournalDsiType.PendingJustification ? JournalShuffleUtils.shuffleBadJournalText() : JournalShuffleUtils.shuffleJournalText(); if (journalType == (int)DdtJournalDsiType.AfterPending) { journalTxt.Text += "Необходимо решить вопрос о проведении консилиума."; this.journalType = (int)DdtJournalDsiType.BeforeKag; } adTxt.SelectedIndex = JournalShuffleUtils.shuffleNextIndex(adTxt.Items.Count - 1); chddTxt.SelectedIndex = chddTxt.FindString("14"); chssTxt.SelectedIndex = JournalShuffleUtils.shuffleNextIndex(chssTxt.Items.Count - 1); } }