Пример #1
0
        protected void ddlMinistry_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!ddlMinistry.SelectedValue.Equals(UNSELECTED_MINISTRY))
            {
                Shiloh.BL.MinistryEntry entry = new Shiloh.BL.MinistryEntry(Convert.ToInt32(ddlMinistry.SelectedValue));

                if (entry.Id > 0)
                {
                    LoadEntry(entry);
                }
                else
                    ClearForm();
            }
        }
Пример #2
0
        protected bool SaveInfo()
        {
            bool isSaved = false;

            Shiloh.BL.MinistryEntry entry = new Shiloh.BL.MinistryEntry(Convert.ToInt32(ddlMinistry.SelectedValue));

            entry.contactEmail = txtContactEmail.Text;
            entry.contactName = txtContactName.Text;
            entry.contactPhone1 = txtContactPhone1.Text;
            entry.contactPhone2 = txtContactPhone2.Text;

            if (entry.Id == 0)
                entry.dateCreated = DateTime.Now;

            entry.description = txtSummaryDetailed.Text;
            entry.isLocked = false;
            entry.miscInfo = txtMiscInfo.Text;
            entry.programInfo = txtPrograms.Text;
            entry.summary = txtSummaryBrief.Text;
            entry.supportInfo = txtSupport.Text;

            try
            {
                isSaved = entry.Save();
            }
            catch (Exception ex)
            {
                lblMsg.Text = (ex.InnerException!=null) ? ex.InnerException.Message : ex.Message;
            }

            return isSaved;
        }