protected void btnCanel_Click(object sender, EventArgs e) { if (lblRequiredEventID.Text == string.Empty || lblMeetingID.Text == string.Empty) { cleartext(); } else { try { App_Data.RequiredEventMeeting MeetingForEdit = RequiredEventDAO.getMeetingByreqIDmeetID(Convert.ToInt32(Request.QueryString[0]), Convert.ToInt32(Request.QueryString[1])); txtMeetingYear.Text = MeetingForEdit.Year; txtNotes.Text = MeetingForEdit.Notes; txtMeetingTime.Text = MeetingForEdit.MeetingTime; txtMeetingBuilding.Text = MeetingForEdit.MeetingBuilding; txtMeetingRoom.Text = MeetingForEdit.MeetingRoomNumber; txtMeetingDate.Text = Convert.ToDateTime(MeetingForEdit.MeetingDate).ToShortDateString(); txtMeetingSession.Text = MeetingForEdit.Session; } catch (Exception) { lblMessage.Text = "Could Not Retrieve Meeting Details!!"; } } }
protected void Page_Load(object sender, EventArgs e) { this.lblRequiredEventID.Text = Request.QueryString[0]; this.lblMeetingID.Text = Request.QueryString[1]; if (lblRequiredEventID.Text != string.Empty && lblMeetingID.Text != string.Empty) { try { App_Data.RequiredEventMeeting MeetingForEdit = RequiredEventDAO.getMeetingByreqIDmeetID(Convert.ToInt32(Request.QueryString[0]), Convert.ToInt32(Request.QueryString[1])); txtMeetingYear.Text = MeetingForEdit.Year; txtNotes.Text = MeetingForEdit.Notes; txtMeetingTime.Text = MeetingForEdit.MeetingTime; txtMeetingBuilding.Text = MeetingForEdit.MeetingBuilding; txtMeetingRoom.Text = MeetingForEdit.MeetingRoomNumber; txtMeetingDate.Text = Convert.ToDateTime(MeetingForEdit.MeetingDate).ToShortDateString(); txtMeetingSession.Text = MeetingForEdit.Session; btnAddRequiredEventMeeting.Text = "Submit"; } catch (Exception) { lblMessage.Text = "Could Not Retrieve Meeting Details!!"; } } }