Ejemplo n.º 1
0
        private void SetFormFieldData(string journalId)
        {
            ProjectJournal biz = new ProjectJournal();

            biz.Get(int.Parse(journalId));

            CICHelper.SetFieldValues(Form.Controls, biz);
        }
Ejemplo n.º 2
0
        private void PopulateJournalName(string journalId)
        {
            if (string.IsNullOrEmpty(journalId))
            {
                return;
            }

            ProjectJournal biz = new ProjectJournal();

            biz.Get(Int32.Parse(journalId));

            JournalName.Text = biz["JournalName"].ToString();
        }
Ejemplo n.º 3
0
        protected void DeleteClick(object sender, CommandEventArgs e)
        {
            ProjectJournal journal   = new ProjectJournal();
            string         journalId = JournalSelect.SelectedValue;

            try
            {
                if (journalId != "" && journalId != _dropDownNewValue)
                {
                    journal.Delete(Int32.Parse(journalId));
                }
                PopulateJournalDropDown(true);
                LoadBlankForm();
                SetFormState(true);
            }
            catch (ChildDataPreventsDeleteException cde)
            {
                string msg = cde.Message.Replace("unable to delete this journal record", "<span class=\"requiredField\">unable to delete this physician record</span>");
                UserMessage.Text = msg.Replace("\n", "<br/>");
                SetFormState(false);
            }
        }
Ejemplo n.º 4
0
        protected void SaveClick(object sender, CommandEventArgs e)
        {
            ProjectJournal biz = new ProjectJournal();

            if (!_selectedJournal.Equals(_dropDownNewValue) && _selectedJournal != null)
            {
                biz.Get(int.Parse(_selectedJournal));
            }

            CICHelper.SetBOValues(Form.Controls, biz, 0);

            biz.Save();


            _selectedJournal = biz[ProjectJournal.JournalId].ToString();
            JournalId.Value  = biz[ProjectJournal.JournalId].ToString();

            PopulateJournalDropDown(false);

            SetFormState(false);

            RefreshMainList(_selectedJournal);
        }