protected void GVEvents_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName.Equals("DeleteNews"))
     {
         BLL.EventsLib oEventsLib = new BLL.EventsLib();
         oEventsLib.DeleteEventDetails(Convert.ToInt32(e.CommandArgument));
         lblMsg.Text = "Event has been deleted successfully.";
         oEventsLib = null;
         BindEvents();
     }
     else if (e.CommandName.Equals("StatusChanged"))
     {
         BLL.EventsLib oEventsLib = new BLL.EventsLib();
         oEventsLib.ActivateDeactivateEvent(Convert.ToInt32(e.CommandArgument));
         lblMsg.Text = "Event status has been changed successfully.";
         oEventsLib = null;
         BindEvents();
     }
     else if (e.CommandName.Equals("AppDisStatusChanged"))
     {
         BLL.EventsLib oEventsLib = new BLL.EventsLib();
         oEventsLib.ApproveDisapproveEvent(Convert.ToInt32(e.CommandArgument));
         lblMsg.Text = "Event status has been changed successfully.";
         oEventsLib = null;
         BindEvents();
     }
 }
    protected void GVEvents_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Equals("EditNews"))
        {
            Entity.EventInfo oEventInfo = new Entity.EventInfo();
            BLL.EventsLib oEventsLib = new BLL.EventsLib();
            oEventInfo = oEventsLib.GetEventByEventId(Convert.ToInt32(e.CommandArgument));
            if (oEventInfo != null)
            {
                ViewState["intEventId"] = e.CommandArgument.ToString();
                txtActivity.Text = oEventInfo.StrActivity;
                txtComments.Text = oEventInfo.StrComments;
                txtDate.Text = oEventInfo.DtEventDate.ToShortDateString();
                txtLocation.Text = oEventInfo.StrLocation;
            }
        }
        else if (e.CommandName.Equals("DeleteNews"))
        {

            BLL.EventsLib oEventsLib = new BLL.EventsLib();
            oEventsLib.DeleteEventDetails(Convert.ToInt32(e.CommandArgument));
            lblMsg.Text = "Event has been deleted successfully.";

            oEventsLib = null;
            ClearControls();
            BindEvents();
        }
        else if (e.CommandName.Equals("StatusChanged"))
        {
            BLL.EventsLib oEventsLib = new BLL.EventsLib();
            oEventsLib.ActivateDeactivateEvent(Convert.ToInt32(e.CommandArgument));
            lblMsg.Text = "Event status has been changed successfully.";
            oEventsLib = null;
            ClearControls();
            BindEvents();
        }
    }