public StudentOrganisationApp.App_Data.MemberType getMemberTypeByID(int memID)
        {
            var mem = dataContext.sp_GetMemberTypeByID(memID).First();

            StudentOrganisationApp.App_Data.MemberType memberType = new App_Data.MemberType();
            memberType.MemberName  = mem.MemberName;
            memberType.Description = mem.Description;
            memberType.EndDate     = mem.EndDate;
            memberType.AddDate     = mem.AddDate;
            memberType.BoardMember = mem.BoardMember;

            return(memberType);
        }
        protected void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToInt32(ddlSelectMemberType.SelectedItem.Value) != -1)
                {
                    pnlEditing.Visible          = true;
                    ddlSelectMemberType.Enabled = false;


                    App_Data.MemberType memberTypeForEdit = MemberTypeDAO.getMemberTypeByID(Convert.ToInt32(ddlSelectMemberType.SelectedItem.Value));

                    txtEditMemTypeName.Text = memberTypeForEdit.MemberName;
                    txtMemberDesc.Text      = memberTypeForEdit.Description;
                    chkBroadMember.Checked  = (bool)memberTypeForEdit.BoardMember;
                    if (memberTypeForEdit.AddDate == null)
                    {
                        txtMemTypeAddDate.Text = string.Empty;
                    }
                    else
                    {
                        txtMemTypeAddDate.Text = Convert.ToDateTime(memberTypeForEdit.AddDate).ToShortDateString();
                    }
                    if (memberTypeForEdit.EndDate == null)
                    {
                        txtExtenderEditMemType.Text = string.Empty;
                    }
                    else
                    {
                        txtExtenderEditMemType.Text = Convert.ToDateTime(memberTypeForEdit.EndDate).ToShortDateString();
                    }
                }
            }
            catch (Exception)
            {
                lblMessage.Text = "Could Not Retrieve Member Type Details!!";
            }
        }