예제 #1
0
        public RequiredEvent getRequiredEventByID(int reqID)
        {
            RequiredEvent reqEvent = new RequiredEvent();
            var           meet     = dataContext.sp_GetRequiredEventByID(reqID).First();

            reqEvent.AddDate          = meet.AddDate;
            reqEvent.RequiredEvent1   = meet.RequiredEvent;
            reqEvent.RequiredEvent_ID = meet.RequiredEvent_ID;
            reqEvent.EventDescription = meet.EventDescription;
            return(reqEvent);
        }
예제 #2
0
        public IList getRequiredEventList()
        {
            List <RequiredEvent> events = new List <RequiredEvent>();
            var evn = dataContext.sp_GetRequiredEventList();

            foreach (var x in evn)
            {
                RequiredEvent even = new RequiredEvent();
                even.AddDate          = x.AddDate;
                even.EventDescription = x.EventDescription;
                even.RequiredEvent_ID = x.RequiredEvent_ID;
                even.RequiredEvent1   = x.RequiredEvent;
                events.Add(even);
            }
            return(events);
        }
        protected void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                if (ddlRequiredEvents.SelectedValue != "-1")
                {
                    pnlEditing.Visible = true;
                    pnlMeeting.Visible = true;

                    RequiredEvent eventForEdit = RequiredEventDAO.getRequiredEventByID(Convert.ToInt32(ddlRequiredEvents.SelectedValue));
                    txtEventNotes.Text            = eventForEdit.EventDescription;
                    txtExtenderRequiredEvent.Text = eventForEdit.AddDate == null?string.Empty:Convert.ToDateTime(eventForEdit.AddDate).ToShortDateString();
                    txtRequiredEvent.Text         = eventForEdit.RequiredEvent1;
                    grdMeeting.DataSource         = RequiredEventDAO.getMeetingForReqEventID(Convert.ToInt32(ddlRequiredEvents.SelectedValue));
                    grdMeeting.DataBind();
                }
            }
            catch (Exception)
            {
                lblMessage.Text = "Could Not Retrieve Organization Requirement Details!!";
            }
        }