private void SetFormFieldData(string journalId) { ProjectJournal biz = new ProjectJournal(); biz.Get(int.Parse(journalId)); CICHelper.SetFieldValues(Form.Controls, biz); }
private void PopulateJournalName(string journalId) { if (string.IsNullOrEmpty(journalId)) { return; } ProjectJournal biz = new ProjectJournal(); biz.Get(Int32.Parse(journalId)); JournalName.Text = biz["JournalName"].ToString(); }
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); } }
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); }