Ejemplo n.º 1
0
 protected void btnTakhliyehInsert_Click(object sender, EventArgs e)
 {
     if (txtTakhliyehTitle.Text != "")
     {
         Value.InsertValues(lblTakhliyehID.Text, lblTakhliyehValue.Text, txtTakhliyehTitle.Text);
     }
     txtTakhliyehTitle.Text = "";
     GridView15.DataBind();
 }
Ejemplo n.º 2
0
    protected void BindGridview2()
    {
        DataSet ds = new DataSet();
        string  cs = System.Configuration.ConfigurationManager.ConnectionStrings["Flare BroadcastConnectionString"].ConnectionString;

        SqlConnection con = new SqlConnection(cs);
        {
            con.Open();
            SqlCommand     cmd = new SqlCommand("select * from SubCategory,Category WHERE Category.Category_id = SubCategory.Category_id", con);
            SqlDataAdapter da  = new SqlDataAdapter(cmd);
            da.Fill(ds);
            con.Close();
            GridView15.DataSource = ds;
            GridView15.DataBind();
        }
    }
        private void View9_DataBind()
        {
            GridView14.DataBind();
            GridView15.DataBind();
            Chart9.DataBind();
            Label47.Text = DropDownList10.SelectedItem.Text;
            Label48.Text = DropDownList11.SelectedItem.Text;

            Label47.Visible = true;
            Label48.Visible = true;
            Label46.Text    = DropDownList10.SelectedItem.Text + " Vs " + DropDownList11.SelectedItem.Text + " Overrall Comparison";
            Label46.Visible = true;
            if (Chart8.Series[0].Points.Count > 0 || Chart8.Series[1].Points.Count > 0)
            {
                Chart8.Visible = true;
            }
        }
Ejemplo n.º 4
0
    protected void btn14_Click(object sender, EventArgs e)
    {
        // Clear all content output from the buffer stream
        Response.ClearContent();
        // Specify the default file name using "content-disposition" RESPONSE header
        Response.AppendHeader("content-disposition", "attachment; filename=timetable.xls");
        // Set excel as the HTTP MIME type
        Response.ContentType = "application/excel";
        // Create an instance of stringWriter for writing information to a string
        System.IO.StringWriter stringWriter14 = new System.IO.StringWriter();
        // Create an instance of HtmlTextWriter class for writing markup
        // characters and text to an ASP.NET server control output stream
        HtmlTextWriter htw14 = new HtmlTextWriter(stringWriter14);

        GridView15.RenderControl(htw14);
        Response.Write(stringWriter14.ToString());
        Response.End();
    }
Ejemplo n.º 5
0
        protected void odswiez()
        {
            Session["data_1"] = Date1.Text;
            Session["data_2"] = Date2.Text;
            string yyx = (string)Session["id_dzialu"];

            id_dzialu.Text = (string)Session["txt_dzialu"];
            string txt = string.Empty; //

            txt = "File name: <b>onsk.aspx</b></br>";

            cl.deleteRowTable();

            txt = txt + cl.clear_maim_db();
            try
            {
                txt = txt + cl.generuj_dane_do_tabeli_wierszy(Date1.Date, Date2.Date, yyx, 1, tenPlik);
                txt = txt + cl.generuj_dane_do_tabeli_wierszy(Date1.Date, Date2.Date, yyx, 10, tenPlik);

                try
                {
                    DataTable dt01 = cl.generuj_dane_do_tabeli_wierszy_przestawnych1(Date1.Date, Date2.Date, yyx, 1000, 1, tenPlik);
                    cm.log.Error(tenPlik + " generuj_dane_do_tabeli_przestawnych 1000 il wierszy" + dt01.Rows.Count.ToString());

                    GridView13.DataSource          = null;
                    GridView13.ShowHeader          = false;
                    GridView13.DataSourceID        = null;
                    GridView13.AutoGenerateColumns = false;
                    GridView13.DataSource          = dt01;
                    GridView13.DataBind();
                }
                catch (Exception ex)
                {
                    cm.log.Error(tenPlik + " generuj_dane_do_tabeli_przestawnych 1000 " + ex.Message);
                }

                try
                {
                    DataTable dt01 = cl.generuj_dane_do_tabeli_wierszy_przestawnych1(Date1.Date, Date2.Date, yyx, 1002, 1, tenPlik);

                    GridView15.DataSource          = null;
                    GridView15.ShowHeader          = false;
                    GridView15.DataSourceID        = null;
                    GridView15.AutoGenerateColumns = false;
                    GridView15.DataSource          = dt01;
                    GridView15.DataBind();
                }
                catch (Exception ex)
                {
                    cm.log.Error(tenPlik + " generuj_dane_do_tabeli_przestawnych 1002 " + ex.Message);
                }

                //====================================================
                try
                {
                    DataTable dt01 = cl.generuj_dane_do_tabeli_przestawnych(int.Parse((string)Session["id_dzialu"]), 1001, Date1.Date, Date2.Date, tenPlik);
                    // DataTable dt01 = dr.tworzTabele(int.Parse((string)Session["id_dzialu"]), 1001, Date1.Date, Date2.Date, 30, GridView14, tenPlik);
                    GridView14.DataSource          = null;
                    GridView14.ShowHeader          = false;
                    GridView14.DataSourceID        = null;
                    GridView14.AutoGenerateColumns = false;
                    GridView14.DataSource          = dt01;
                    GridView14.DataBind();
                }
                catch (Exception ex)
                {
                    cm.log.Error(tenPlik + " generuj_dane_do_tabeli_przestawnych 1001 " + ex.Message);
                }
                try
                {
                    DataTable dt01 = cl.generuj_dane_do_tabeli_przestawnych(int.Parse((string)Session["id_dzialu"]), 1003, Date1.Date, Date2.Date, tenPlik);

                    GridView16.DataSource          = null;
                    GridView16.ShowHeader          = false;
                    GridView16.DataSourceID        = null;
                    GridView16.AutoGenerateColumns = false;
                    GridView16.DataSource          = dt01;
                    GridView16.DataBind();
                }
                catch (Exception ex)
                {
                    cm.log.Error(tenPlik + " generuj_dane_do_tabeli_przestawnych 1003 " + ex.Message);
                }

                DataTable dt1 = cl.generuj_dane_do_tabeli_wierszy_przestawnych1(Date1.Date, Date2.Date, yyx, 2000, 1, tenPlik);

                GridView17.DataSource          = null;
                GridView17.ShowHeader          = false;
                GridView17.DataSourceID        = null;
                GridView17.AutoGenerateColumns = false;
                GridView17.DataSource          = dt1;
                GridView17.DataBind();

                DataTable dt2 = cl.generuj_dane_do_tabeli_przestawnych(int.Parse((string)Session["id_dzialu"]), 2001, Date1.Date, Date2.Date, tenPlik);

                GridView18.DataSource          = null;
                GridView18.ShowHeader          = false;
                GridView18.DataSourceID        = null;
                GridView18.AutoGenerateColumns = false;
                GridView18.DataSource          = dt2;
                GridView18.DataBind();

                DataTable dt3 = cl.generuj_dane_do_tabeli_wierszy_przestawnych1(Date1.Date, Date2.Date, yyx, 2002, 1, tenPlik);

                GridView19.DataSource          = null;
                GridView19.ShowHeader          = false;
                GridView19.DataSourceID        = null;
                GridView19.AutoGenerateColumns = false;
                GridView19.DataSource          = dt3;
                GridView19.DataBind();

                DataTable dt4 = cl.generuj_dane_do_tabeli_przestawnych(int.Parse((string)Session["id_dzialu"]), 2003, Date1.Date, Date2.Date, tenPlik);

                GridView20.DataSource          = null;
                GridView20.ShowHeader          = false;
                GridView20.DataSourceID        = null;
                GridView20.AutoGenerateColumns = false;
                GridView20.DataSource          = dt4;
                GridView20.DataBind();

                txt = txt + cl.generuj_dane_do_tabeli_(int.Parse((string)Session["id_dzialu"]), 2, Date1.Date, Date2.Date);
                txt = txt + cl.generuj_dane_do_tabeli_(int.Parse((string)Session["id_dzialu"]), 3, Date1.Date, Date2.Date);
                txt = txt + cl.generuj_dane_do_tabeli_(int.Parse((string)Session["id_dzialu"]), 4, Date1.Date, Date2.Date);
                txt = txt + cl.generuj_dane_do_tabeli_(int.Parse((string)Session["id_dzialu"]), 5, Date1.Date, Date2.Date);
                txt = txt + cl.generuj_dane_do_tabeli_(int.Parse((string)Session["id_dzialu"]), 6, Date1.Date, Date2.Date);
                txt = txt + cl.generuj_dane_do_tabeli_(int.Parse((string)Session["id_dzialu"]), 8, Date1.Date, Date2.Date);
                txt = txt + cl.uzupelnij_statusy();
            }
            catch
            {
            }

            // dopasowanie opisów
            makeLabels();
            GridView1.DataBind();
            GridView2.DataBind();
            GridView3.DataBind();
            GridView4.DataBind();
            GridView6.DataBind();
            GridView7.DataBind();
            GridView8.DataBind();

            try
            {
                Label11.Visible = cl.debug(int.Parse(yyx));
            }
            catch
            {
                Label11.Visible = false;
            }

            Label11.Text = txt;
            Label3.Text  = cl.nazwaSadu((string)Session["id_dzialu"]);
            makeHeader();
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(CS);

            con.Open();
            Label1.Text = "All info about the employee with ID 8";
            SqlCommand cmd1 = new SqlCommand("select * from employees where EmployeeID=8", con);

            GridView1.DataSource = cmd1.ExecuteReader();
            GridView1.DataBind();
            con.Close();

            con.Open();
            Label2.Text = "The list of first and last names of the employees from London";
            SqlCommand cmd2 = new SqlCommand("select FirstName,LastName from employees where City='London'", con);

            GridView2.DataSource = cmd2.ExecuteReader();
            GridView2.DataBind();
            con.Close();

            con.Open();
            Label3.Text = "The list of first and last names of the employees whose first name begins with letter A";
            SqlCommand cmd3 = new SqlCommand("select FirstName,LastName from employees where FirstName like 'A%' ", con);

            GridView3.DataSource = cmd3.ExecuteReader();
            GridView3.DataBind();
            con.Close();

            con.Open();
            Label4.Text = "The list of first, last names and ages of the employees whose age is greater than 55. The result should be sorted by last name";
            SqlCommand cmd4 = new SqlCommand("select FirstName,LastName ,(CURRENT_TIMESTAMP-BirthDate)as ages from employees where (CURRENT_TIMESTAMP-BirthDate) > 55 order by LastName", con);

            GridView4.DataSource = cmd4.ExecuteReader();
            GridView4.DataBind();
            con.Close();

            con.Open();
            Label5.Text = "The count of employees from London";
            SqlCommand cmd5 = new SqlCommand("select count(*) from employees where city='London'", con);

            GridView5.DataSource = cmd5.ExecuteReader();
            GridView5.DataBind();
            con.Close();

            con.Open();
            Label6.Text = "The greatest, the smallest and the average age among the employees from London";
            SqlCommand cmd6 = new SqlCommand(" SELECT city,CONVERT(datetime,avg(CONVERT(INT, BirthDate)))as AVG,CONVERT(datetime,max(CONVERT(INT, BirthDate)))as MAX,CONVERT(datetime,min(CONVERT(INT, BirthDate)))as MIN from employees where city='London' group by city", con);

            GridView6.DataSource = cmd6.ExecuteReader();
            GridView6.DataBind();
            con.Close();

            con.Open();
            Label7.Text = "The greatest, the smallest and the average age of the employees for each city";
            SqlCommand cmd7 = new SqlCommand(" SELECT CONVERT(datetime,avg(CONVERT(INT, BirthDate)))as AVG,CONVERT(datetime,max(CONVERT(INT, BirthDate)))as MAX,CONVERT(datetime,min(CONVERT(INT, BirthDate)))as MIN from employees", con);

            GridView7.DataSource = cmd7.ExecuteReader();
            GridView7.DataBind();
            con.Close();

            con.Open();
            Label8.Text = "The greatest, the smallest and the average age of the employees for each city";
            SqlCommand cmd8 = new SqlCommand(" SELECT CONVERT(datetime,avg(CONVERT(INT, BirthDate)))as AVG,CONVERT(datetime,max(CONVERT(INT, BirthDate)))as MAX,CONVERT(datetime,min(CONVERT(INT, BirthDate)))as MIN from employees", con);

            GridView8.DataSource = cmd8.ExecuteReader();
            GridView8.DataBind();
            con.Close();

            con.Open();
            Label9.Text = "First, last names and dates of birth of the employees who celebrate their birthdays this month";
            SqlCommand cmd9 = new SqlCommand("select FirstName,LastName,BirthDate from employees where MONTH(BirthDate)=MONTH(GETDATE())", con);

            GridView9.DataSource = cmd9.ExecuteReader();
            GridView9.DataBind();
            con.Close();

            con.Open();
            Label10.Text = "First and last names of the employees who used to serve orders shipped to Madrid";
            SqlCommand cmd10 = new SqlCommand("select distinct FirstName,LastName,shipcity from employees inner join orders on employees.EmployeeID=orders.EmployeeID where shipcity='Madrid'", con);

            GridView10.DataSource = cmd10.ExecuteReader();
            GridView10.DataBind();
            con.Close();

            con.Open();
            Label11.Text = "First and last names of the employees who used to serve orders shipped to Madrid";
            SqlCommand cmd11 = new SqlCommand("select distinct FirstName,LastName,shipcity from employees inner join orders on employees.EmployeeID=orders.EmployeeID where shipcity='Madrid'", con);

            GridView11.DataSource = cmd11.ExecuteReader();
            GridView11.DataBind();
            con.Close();

            con.Open();
            Label12.Text = "The count of orders made by each customer from France";
            SqlCommand cmd12 = new SqlCommand("select count(*) from orders inner join customers on orders.shipcountry = customers.country where customers.country='France'", con);

            GridView12.DataSource = cmd12.ExecuteReader();
            GridView12.DataBind();
            con.Close();

            con.Open();
            Label13.Text = "The list of french customers’ names who used to order non-french products";
            SqlCommand cmd13 = new SqlCommand("select distinct ContactName from Customers left join Orders on Customers.country <> Orders.ShipCountry where country='France'", con);

            GridView13.DataSource = cmd13.ExecuteReader();
            GridView13.DataBind();
            con.Close();

            con.Open();
            Label14.Text = "The total ordering sum calculated for each country of customer";
            SqlCommand cmd14 = new SqlCommand("select count(orders.shipcountry),customers.country from orders inner join customers on orders.shipcountry=customers.country group by customers.country", con);

            GridView14.DataSource = cmd14.ExecuteReader();
            GridView14.DataBind();
            con.Close();

            con.Open();
            Label15.Text = "The list of cities where employees and customers are from and where orders have been made to. Duplicates should be eliminated.";
            SqlCommand cmd15 = new SqlCommand("SELECT distinct Orders.shipcity FROM((Orders INNER JOIN Customers ON Orders.shipcity = Customers.city) INNER JOIN employees ON Orders.shipcity = employees.city)", con);

            GridView15.DataSource = cmd15.ExecuteReader();
            GridView15.DataBind();
            con.Close();
        }
Ejemplo n.º 7
0
    protected void btnEmail_Click(object sender, EventArgs e)
    {
        strEmail = txtEmail.Text;

        DataSourceSelectArguments srUserID_IDStr = new DataSourceSelectArguments();
        DataView dvUserID_IDStr = (DataView)SqlDataSource5.Select(srUserID_IDStr);

        if (dvUserID_IDStr.Count != 0)
        {
            strUserID_ID = dvUserID_IDStr[0][0].ToString();
        }

        DataSourceSelectArguments srUserID_SSOStr = new DataSourceSelectArguments();
        DataView dvUserID_SSOStr = (DataView)SqlDataSource14.Select(srUserID_SSOStr);

        if (dvUserID_SSOStr.Count != 0)
        {
            strUserID_SSO = dvUserID_SSOStr[0][0].ToString();
        }

        DataSourceSelectArguments srTokenUser = new DataSourceSelectArguments();
        DataView dvTokenUser = (DataView)SqlDataSource4.Select(srTokenUser);

        if (dvTokenUser.Count != 0)
        {
            strTokenUser = dvTokenUser[0][0].ToString();
        }

        DataSourceSelectArguments srTokenPassStr = new DataSourceSelectArguments();
        DataView dvTokenPassStr = (DataView)SqlDataSource12.Select(srTokenPassStr);

        if (dvTokenPassStr.Count != 0)
        {
            strTokenPass = dvTokenPassStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgTempStr = new DataSourceSelectArguments();
        DataView dvOrgTempStr = (DataView)SqlDataSource110.Select(srOrgTempStr);

        if (dvOrgTempStr.Count != 0)
        {
            strOrgTemp = dvOrgTempStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgTempIDStr = new DataSourceSelectArguments();
        DataView dvOrgTempIDStr = (DataView)SqlDataSource118.Select(srOrgTempIDStr);

        if (dvOrgTempIDStr.Count != 0)
        {
            strOrgTempID = dvOrgTempIDStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgTempNameStr = new DataSourceSelectArguments();
        DataView dvOrgTempNameStr = (DataView)SqlDataSource124.Select(srOrgTempNameStr);

        if (dvOrgTempNameStr.Count != 0)
        {
            strOrgTempName = dvOrgTempNameStr[0][0].ToString();
        }


        DataSourceSelectArguments srOrgIDStr = new DataSourceSelectArguments();
        DataView dvOrgIDStr = (DataView)SqlDataSource111.Select(srOrgIDStr);

        if (dvOrgIDStr.Count != 0)
        {
            strOrgID = dvOrgIDStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgAccessRequestedStr = new DataSourceSelectArguments();
        DataView dvOrgAccessRequestedStr = (DataView)SqlDataSource112.Select(srOrgAccessRequestedStr);

        if (dvOrgAccessRequestedStr.Count != 0)
        {
            strOrgAccessRequested = dvOrgAccessRequestedStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgModAccessRequestedStr = new DataSourceSelectArguments();
        DataView dvOrgModAccessRequestedStr = (DataView)SqlDataSource113.Select(srOrgModAccessRequestedStr);

        if (dvOrgModAccessRequestedStr.Count != 0)
        {
            strOrgModAccessRequested = dvOrgModAccessRequestedStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgLicAccessRequestedStr = new DataSourceSelectArguments();
        DataView dvOrgLicAccessRequestedStr = (DataView)SqlDataSource114.Select(srOrgLicAccessRequestedStr);

        if (dvOrgLicAccessRequestedStr.Count != 0)
        {
            strOrgLicAccessRequested = dvOrgLicAccessRequestedStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrgMembershipUserIDStr = new DataSourceSelectArguments();
        DataView dvOrgMembershipUserIDStr = (DataView)SqlDataSource115.Select(srOrgMembershipUserIDStr);

        if (dvOrgMembershipUserIDStr.Count != 0)
        {
            strOrgMembershipUserID = dvOrgMembershipUserIDStr[0][0].ToString();
        }

        DataSourceSelectArguments srUserPasswordExpiryDt = new DataSourceSelectArguments();
        DataView dvUserPasswordExpiryDt = (DataView)SqlDataSource116.Select(srUserPasswordExpiryDt);

        if (dvUserPasswordExpiryDt.Count != 0)
        {
            strDateUserPasswordExpiry = dvUserPasswordExpiryDt[0][0].ToString();
        }

        DataSourceSelectArguments srUserPasswordChangedDt = new DataSourceSelectArguments();
        DataView dvUserPasswordChangedDt = (DataView)SqlDataSource126.Select(srUserPasswordChangedDt);

        if (dvUserPasswordChangedDt.Count != 0)
        {
            strDateUserPasswordChanged = dvUserPasswordChangedDt[0][0].ToString();
        }



        DataSourceSelectArguments srUserPasswordResetTokenDt = new DataSourceSelectArguments();
        DataView dvUserPasswordResetTokenDt = (DataView)SqlDataSource122.Select(srUserPasswordResetTokenDt);

        if (dvUserPasswordResetTokenDt.Count != 0)
        {
            strDatePasswordResetToken = dvUserPasswordResetTokenDt[0][0].ToString();
        }

        DataSourceSelectArguments srDateRegisteredDt = new DataSourceSelectArguments();
        DataView dvDateRegisteredDt = (DataView)SqlDataSource121.Select(srDateRegisteredDt);

        if (dvDateRegisteredDt.Count != 0)
        {
            strDateRegistered = dvDateRegisteredDt[0][0].ToString();
        }

        DataSourceSelectArguments srUserTempDetailsStr = new DataSourceSelectArguments();
        DataView dvUserTempDetailsStr = (DataView)SqlDataSource117.Select(srUserTempDetailsStr);

        if (dvUserTempDetailsStr.Count != 0)
        {
            strUserID_TempID = dvUserTempDetailsStr[0][0].ToString();
        }

        DataSourceSelectArguments srOrganisationRequestStr = new DataSourceSelectArguments();
        DataView dvOrganisationRequestStr = (DataView)SqlDataSource119.Select(srOrganisationRequestStr);

        if (dvOrganisationRequestStr.Count != 0)
        {
            strOrganisationRequest = dvOrganisationRequestStr[0][0].ToString();
        }


        DataSourceSelectArguments srUserID_UPMStr = new DataSourceSelectArguments();
        DataView dvUserID_UPMStr = (DataView)SqlDataSource120.Select(srUserID_UPMStr);

        if (dvUserID_UPMStr.Count != 0)
        {
            strUserID_UPM = dvUserID_UPMStr[0][0].ToString();
        }


        DataSourceSelectArguments srEventTypeRejectedStr = new DataSourceSelectArguments();
        DataView dvEventTypeRejectedStr = (DataView)SqlDataSource123.Select(srEventTypeRejectedStr);

        if (dvEventTypeRejectedStr.Count != 0)
        {
            strEventTypeRejected = dvEventTypeRejectedStr[0][0].ToString();
        }



        dtDateToday = DateTime.Now;

        /*
         * Password expiry notification and countdown
         *
         */

        dtDateUserPasswordExpiry = null;

        if (!string.IsNullOrEmpty(strDateUserPasswordExpiry))
        {
            dtDateUserPasswordExpiry = DateTime.ParseExact(strDateUserPasswordExpiry, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
            dtDateUserPasswordExpiryForSubtraction = DateTime.ParseExact(strDateUserPasswordExpiry, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
        }
        if (dtDateUserPasswordExpiry != null && dtDateToday > dtDateUserPasswordExpiry && strOrgID != "7c310be0-c20f-de11-b526-0022642a33b2")
        {
            divPasswordExpiry.Visible   = true;
            lblPasswordExpiry.Text      = "EDEN password has expired";
            lblPasswordExpiry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divPasswordExpiry.Visible = false;
        }

        /*
         * Registration expiry
         *
         */

        if (!string.IsNullOrEmpty(strDateRegistered))
        {
            dtDateRegistered = DateTime.ParseExact(strDateRegistered, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
            tsDateRegistrationValidTimeRemaining = dtDateRegistered.AddHours(+24).Subtract(DateTime.Now);
        }

        if (strUserID_SSO == null && dtDateRegistered != null && strDateRegistered != null && dtDateRegistered < DateTime.Now.AddHours(-24))
        {
            divRegistrationExpiry.Visible   = true;
            lblRegistrationExpiry.Text      = "<i>Registration token has expired.</i> <br />- User's registration must be deleted to allow re-registration";
            lblRegistrationExpiry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divRegistrationExpiry.Visible = false;
        }

        if (strUserID_SSO == null && dtDateRegistered != null && strDateRegistered != null && dtDateRegistered > DateTime.Now.AddHours(-24))
        {
            divRegistrationExpiry.Visible   = true;
            lblRegistrationExpiry.Text      = "Registration token is valid.<br />- The account verification link can be copied and emailed to the user if the notification has been blocked or re-routed. <br/>- This link is valid until " + dtDateRegistered.AddHours(+24) + ". Remaining time: <b>" + tsDateRegistrationValidTimeRemaining.ToString(@"hh\:mm") + "</b> hours";
            lblRegistrationExpiry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#4d9900");
        }
        else
        {
            divRegistrationExpiry.Visible = false;
        }

        if (dtDateRegistered == null)
        {
            divRegistrationExpiry.Visible = false;
        }

        if (strUserID_SSO != null)
        {
            divRegistrationExpiry.Visible = false;
        }



        /*
         * Password reset token expiry
         *
         */
        //dtDatePasswordResetToken='';
        if (!string.IsNullOrEmpty(strDatePasswordResetToken))
        {
            dtDatePasswordResetToken = DateTime.ParseExact(strDatePasswordResetToken, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);
            tsDatePasswordResetTokenTimeRemaining = dtDatePasswordResetToken.AddHours(+24).Subtract(DateTime.Now);
        }

        if (strUserID_SSO != null && dtDatePasswordResetToken != null && strDatePasswordResetToken != null && dtDatePasswordResetToken < DateTime.Now.AddHours(-24))
        {
            divPasswordResetTokenExpiry.Visible   = true;
            lblPasswordResetTokenExpiry.Text      = "<br /><i>Password reset token has expired.</i> <br />- The user will need to be begin the password reset process again and generate a new token.";
            lblPasswordResetTokenExpiry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divPasswordResetTokenExpiry.Visible = false;
        }

        if (strUserID_SSO != null && dtDatePasswordResetToken != null && dtDatePasswordResetToken > DateTime.Now.AddHours(-24))
        {
            divPasswordResetTokenExpiry.Visible   = true;
            lblPasswordResetTokenExpiry.Text      = "<br />Password reset token is valid.<br />- The password reset token can be copied and emailed to the user.<br/>- This token is valid until " + dtDatePasswordResetToken.AddHours(+24) + ". Remaining time: <b>" + tsDatePasswordResetTokenTimeRemaining.ToString(@"hh\:mm") + "</b> hours (after which the user will need to be begin the password reset process again and generate a new token).";
            lblPasswordResetTokenExpiry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#4d9900");
        }

        if (dtDatePasswordResetToken == null)
        {
            divPasswordResetTokenExpiry.Visible = false;
        }

        if (strUserID_ID == null &&
            strUserID_SSO == null &&
            strUserID_TempID == null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID == null &&
            strTokenUser == null &&
            strOrgAccessRequested == null &&
            strOrgMembershipUserID == null
            )
        {
            divEmailNotFound.Visible   = true;
            lblEmailNotFound.Text      = "Email address not found";
            lblEmailNotFound.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divEmailNotFound.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO == null &&
            strUserID_TempID == null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID == null &&
            strTokenUser != null &&
            strOrgAccessRequested == null &&
            strOrgMembershipUserID == null
            )
        {
            divUserNoConfirmationClicked.Visible   = true;
            lblUserNoConfirmationClicked.Text      = "Status: User has not clicked confirmation email and signed in";
            lblUserNoConfirmationClicked.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserNoConfirmationClicked.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID == null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID == null &&
            strTokenUser != null &&
            strOrgAccessRequested == null &&
            strOrgMembershipUserID == null
            )
        {
            divUserConfirmSignedNoStep1.Visible   = true;
            lblUserConfirmSignedNoStep1.Text      = "Status: EDEN Portal Access Request - Step 1: User has clicked confirmation email, but has not selected an organisation";
            lblUserConfirmSignedNoStep1.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserConfirmSignedNoStep1.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID == null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID != null &&
            strTokenUser != null &&
            strOrgAccessRequested == null &&
            strOrgMembershipUserID == null
            )
        {
            divUserConfirmSignedStep2.Visible    = true;
            divUserConfirmTempOrgDetails.Visible = true;
            lblUserConfirmSignedStep2.Text       = "Status: EDEN Portal Access Request - Step 2: User has selected an organisation, but has not yet added their personal and contact details";
            lblUserConfirmSignedStep2.ForeColor  = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserConfirmSignedStep2.Visible    = false;
            divUserConfirmTempOrgDetails.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID == null &&
            strOrgID == null &&
            strOrgTemp != null &&
            strTokenUser != null
            )
        {
            divUserConfirmSignedLAStep2.Visible   = true;
            divUserConfirmTempOrgDetails.Visible  = true;
            lblUserConfirmSignedLAStep2.Text      = "Status: EDEN Portal Access Request - Step 2: User has selected an organisation, but has not yet added their personal and contact details";
            lblUserConfirmSignedLAStep2.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserConfirmSignedLAStep2.Visible  = false;
            divUserConfirmTempOrgDetails.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID != null &&
            strOrgAccessRequested == null &&
            strTokenUser != null &&
            strOrgMembershipUserID == null &&
            strEventTypeRejected != "Organisation Membership Request Rejected"
            )
        {
            divUserConfirmSignedStep3.Visible    = true;
            divUserConfirmTempOrgDetails.Visible = true;
            lblUserConfirmSignedStep3.Text       = "Status: EDEN Portal Access Request - Step 3: User has selected an organisation, but has not yet selected a module and submitted the access request";
            lblUserConfirmSignedStep3.ForeColor  = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserConfirmSignedStep3.Visible    = false;
            divUserConfirmTempOrgDetails.Visible = false;
        }

        //if (strUserID_SSO != null && strOrgID == null && strUserID_TempID != null && strOrgTemp != null && strOrgAccessRequested == null)
        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strOrgID == null &&
            strOrgTemp != null &&
            strOrgAccessRequested == null &&
            strTokenUser != null &&
            strOrgMembershipUserID == null &&
            strOrganisationRequest == null &&
            strEventTypeRejected == null
            )
        {
            divUserConfirmSignedLAStep3.Visible   = true;
            divUserConfirmTempOrgDetails.Visible  = true;
            lblUserConfirmSignedLAStep3.Text      = "Status: EDEN Portal Access Request - Step 3: User has selected an organisation, but has not yet selected a module and submitted the access request";
            lblUserConfirmSignedLAStep3.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserConfirmSignedLAStep3.Visible  = false;
            divUserConfirmTempOrgDetails.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strOrgID == null &&
            strOrgTemp != null &&
            strOrgAccessRequested == null &&
            strTokenUser != null &&
            strOrgMembershipUserID == null &&
            strOrganisationRequest != null
            )
        {
            divUserNewOrgCreate.Visible   = true;
            lblUserNewOrgCreate.Text      = "Status: User has selected a module and requested to register a <i>new</i> organisation on EDEN. The request is now with the EPA for approval";
            lblUserNewOrgCreate.ForeColor = System.Drawing.ColorTranslator.FromHtml("#4d9900");
        }
        else
        {
            divUserNewOrgCreate.Visible = false;
        }

        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID != null &&
            strOrgAccessRequested != null &&
            strTokenUser != null &&
            strOrgMembershipUserID == null
            )
        {
            divUserRegCompleteNoApproval.Visible   = true;
            divUserConfirmTempOrgDetails.Visible   = true;
            lblUserRegCompleteNoApproval.Text      = "Status: User has selected an organisation, selected a module and submitted the access request. The org admin(s) can now process this request";
            lblUserRegCompleteNoApproval.ForeColor = System.Drawing.ColorTranslator.FromHtml("#4d9900");
        }
        else
        {
            divUserRegCompleteNoApproval.Visible = false;
            divUserConfirmTempOrgDetails.Visible = false;
        }

        //if (strUserID_SSO != null && strOrgID == null && strUserID_TempID != null && strOrgTemp != null && strOrgAccessRequested != null)
        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strOrgID == null &&
            strOrgTemp != null &&
            strOrgAccessRequested != null &&
            strTokenUser != null &&
            strOrgMembershipUserID == null
            )
        {
            divUserRegCompleteNoApprovalLA.Visible   = true;
            lblUserRegCompleteNoApprovalLA.Text      = "Status: User has selected an organisation, selected a module and submitted the access request. The org admin(s) can now process this request";
            lblUserRegCompleteNoApprovalLA.ForeColor = System.Drawing.ColorTranslator.FromHtml("#4d9900");
        }
        else
        {
            divUserRegCompleteNoApprovalLA.Visible = false;
        }



        if (strOrgModAccessRequested != null && strOrgID != null)
        {
            divModuleAccessPending.Visible   = true;
            lblModuleAccessPending.Text      = "Status: One or more module access requests by this user currently Pending Approval";
            lblModuleAccessPending.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divModuleAccessPending.Visible = false;
        }

        if (strOrgID != null)
        {
            divUserConfirmSignedNoStep1.Visible = false;
        }

        if (strUserID_TempID != null)
        {
            divPasswordExpiry.Visible = false;
        }

        if (strOrgModAccessRequested != null && strOrgLicAccessRequested != null)
        {
            GridView16.Visible = true;
            GridView17.Visible = false;
        }

        if (strOrgModAccessRequested == strOrgLicAccessRequested)
        {
            GridView16.Visible = true;
            GridView17.Visible = true;
        }

        if (strOrgMembershipUserID == null)
        {
            GridView23.Visible = true;
        }
        else
        {
            GridView23.Visible = false;
        }


        if (strOrgMembershipUserID == null)
        {
            GridView22.Visible = true;
        }
        else
        {
            GridView22.Visible = false;
        }

        if (strUserID_SSO == null & strTokenUser != null)
        {
            divVerificationLink.Visible = true;
        }
        else
        {
            divVerificationLink.Visible = false;
        }

        if (strUserID_SSO != null)
        {
            divVerificationLink.Visible = false;
        }

        if (strUserID_SSO != null)
        {
            divUserExternalLinks.Visible = true;
        }
        else
        {
            divUserExternalLinks.Visible = false;
        }

        if (strTokenPass == null)
        {
            divPasswordReset.Visible = false;
        }
        else
        {
            divPasswordReset.Visible = true;
        }


        /*
         * EPA Users
         */

        if (strUserID_ID == null &&
            strUserID_SSO != null &&
            strUserID_TempID == null &&
            strUserID_UPM != null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID == null &&
            strTokenUser == null &&
            strTokenPass == null &&
            strOrgAccessRequested == null &&
            strOrgModAccessRequested == null &&
            strOrgLicAccessRequested == null &&
            strOrgMembershipUserID == null &&
            strOrganisationRequest == null &&
            strEventTypeRejected == null
            )
        {
            divUserEPAStep1.Visible   = true;
            lblUserEPAStep1.Text      = "Status: EDEN Portal Access Request - Step 1: EPA user has signed up, but has not selected an organisation";
            lblUserEPAStep1.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserEPAStep1.Visible = false;
        }


        if (strUserID_ID == null &&
            strUserID_SSO != null &&
            strUserID_TempID == null &&
            strUserID_UPM != null &&
            strOrgTemp != null &&
            strOrgAccessRequested == null &&
            strOrgMembershipUserID == null
            )
        {
            divUserEPAStep2.Visible   = true;
            lblUserEPAStep2.Text      = "Status: EDEN Portal Access Request - Step 2: EPA user has selected organisation, but has not yet added their personal and contact details";
            lblUserEPAStep2.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserEPAStep2.Visible = false;
        }

        if (strUserID_ID == null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strUserID_UPM != null &&
            strOrgTemp != null &&
            strOrgAccessRequested == null &&
            strOrgMembershipUserID == null
            )
        {
            divUserEPAStep3.Visible   = true;
            lblUserEPAStep3.Text      = "Status: EDEN Portal Access Request - Step 3: EPA user has added their personal and contact details, but has not yet selected a module";
            lblUserEPAStep3.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserEPAStep3.Visible = false;
        }

        if (strUserID_ID == null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strUserID_UPM != null &&
            strOrgTemp != null &&
            strOrgAccessRequested != null
            )
        {
            divUserRegCompleteNoApprovalEPA.Visible   = true;
            lblUserRegCompleteNoApprovalEPA.Text      = "EPA user has selected an organisation, selected a module and submitted the access request. The EPA org admin(s) can now process this request";
            lblUserRegCompleteNoApprovalEPA.ForeColor = System.Drawing.ColorTranslator.FromHtml("#4d9900");
        }
        else
        {
            divUserRegCompleteNoApprovalEPA.Visible = false;
        }


        if (strUserID_ID == null &&
            strUserID_SSO != null &&
            strUserID_TempID == null &&
            strUserID_UPM != null &&
            strOrgID == null &&
            strOrgTemp == null &&
            strOrgTempID == null &&
            strTokenUser == null &&
            strTokenPass == null &&
            strOrgAccessRequested == null &&
            strOrgModAccessRequested == null &&
            strOrgLicAccessRequested == null &&
            strOrgMembershipUserID == null &&
            strOrganisationRequest == null &&
            strEventTypeRejected == "Organisation Rejected"
            )
        {
            divUserRejectedLA.Visible   = true;
            lblUserRejectedLA.Text      = "Status: User has signed up, but the organisation has been <b>rejected</b><br /> - This email address must be manually deleted from the SSO to be used again to register.";
            lblUserRejectedLA.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserRejectedLA.Visible = false;
        }


        if (strUserID_ID != null &&
            strUserID_SSO != null &&
            strUserID_TempID != null &&
            strEventTypeRejected == "Organisation Rejected"
            )
        {
            divOrgRejected.Visible   = true;
            lblOrgRejected.Text      = "Status: User has signed up, but the <b>organisation creation request</b> has been <b>rejected</b><br /> - This email address must be manually deleted from the SSO to be used again to register.";
            lblOrgRejected.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divOrgRejected.Visible = false;
        }


        if (
            strEventTypeRejected == "Organisation Membership Request Rejected"
            )
        {
            divUserRejectedLA.Visible   = true;
            lblUserRejectedLA.Text      = "Status: User has signed up, but the <b>organisation membership request</b> has been <b>rejected</b><br /> - This email address must be manually deleted from the SSO to be used again to register.";
            lblUserRejectedLA.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserRejectedLA.Visible = false;
        }


        if (
            strEventTypeRejected == "Module Authorisation Rejected"
            )
        {
            divUserRejectedLA.Visible   = true;
            lblUserRejectedLA.Text      = "Status: User's organisation access has been approved, but a module authorisation request has been rejected. (This may have been rectified - please check the notifications below).<br />";
            lblUserRejectedLA.ForeColor = System.Drawing.ColorTranslator.FromHtml("#E60000");
        }
        else
        {
            divUserRejectedLA.Visible = false;
        }


        tsDatePasswordExpiryLessDatePasswordReset = dtDateUserPasswordExpiryForSubtraction - dtDatePasswordResetToken;
        int passwordReset_Expiry_DifferenceInDays = tsDatePasswordExpiryLessDatePasswordReset.Days;

        if (tsDatePasswordExpiryLessDatePasswordReset.Days == 90)
        {
            divPasswordResetTokenExpiry.Visible = false;
        }


        divTokens.Visible             = true;
        divSeperatorCurrent.Visible   = true;
        divSeperatorPending.Visible   = true;
        divSeperatorLicences.Visible  = true;
        divSeperatorTokens.Visible    = true;
        txtCopyVerificationLink.Text  = "https://account.edenireland.ie/signup/confirmemail?userId=" + strUserID_ID + "&token=" + strTokenUser;
        txtCopyPasswordResetLink.Text = "https://account.edenireland.ie/passwordreset/resetpassword?userId=" + strUserID_SSO + "&token=" + strTokenPass;
        GridView1.DataBind();
        GridView2.DataBind();
        GridView3.DataBind();
        GridView4.DataBind();
        GridView5.DataBind();
        GridView6.DataBind();
        GridView7.DataBind();
        GridView8.DataBind();
        GridView9.DataBind();
        GridView10.DataBind();
        GridView11.DataBind();
        GridView12.DataBind();
        GridView13.DataBind();
        GridView14.DataBind();
        GridView15.DataBind();
        GridView16.DataBind();
        GridView17.DataBind();
        GridView18.DataBind();
        GridView19.DataBind();
        GridView20.DataBind();
        GridView21.DataBind();
        GridView22.DataBind();
        GridView23.DataBind();
        GridView24.DataBind();
    }
    public void fetchdata()
    {
        string        connectionString = ConfigurationManager.ConnectionStrings["mycon"].ConnectionString;
        SqlConnection con = new SqlConnection(connectionString);

        con.Open();
        SqlCommand    c   = new SqlCommand("select papername from Publication  where btype='General science' and published='Yes'", con);
        SqlDataReader rdr = c.ExecuteReader();

        GridView1.DataSource = rdr;
        GridView1.DataBind();
        GridView1.GridLines = GridLines.None;
        rdr.Close();
        con.Close();

        con.Open();
        SqlCommand    c2   = new SqlCommand("select papername from Publication  where btype='Neuroscience & Psychology' and published='Yes'", con);
        SqlDataReader rdr2 = c2.ExecuteReader();

        GridView2.DataSource = rdr2;
        GridView2.DataBind();
        GridView2.GridLines = GridLines.None;
        rdr2.Close();
        con.Close();
        con.Open();
        SqlCommand    c3   = new SqlCommand("select papername from Publication  where btype='Genetics & Molicular Biology' and published='Yes'", con);
        SqlDataReader rdr3 = c3.ExecuteReader();

        GridView3.DataSource = rdr3;
        GridView3.DataBind();
        GridView3.GridLines = GridLines.None;
        rdr3.Close();
        con.Close();
        con.Open();
        SqlCommand    c4   = new SqlCommand("select papername from Publication  where btype='Biochemistry' and published='Yes'", con);
        SqlDataReader rdr4 = c4.ExecuteReader();

        GridView4.DataSource = rdr4;
        GridView4.DataBind();
        GridView4.GridLines = GridLines.None;
        rdr4.Close();
        con.Close();
        con.Open();
        SqlCommand    c5   = new SqlCommand("select papername from Publication  where btype='Engineering' and published='Yes'", con);
        SqlDataReader rdr5 = c5.ExecuteReader();

        GridView5.DataSource = rdr5;
        GridView5.DataBind();
        GridView5.GridLines = GridLines.None;
        rdr5.Close();
        con.Close();
        con.Open();
        SqlCommand    c6   = new SqlCommand("select papername from Publication  where btype='Chemistry' and published='Yes'", con);
        SqlDataReader rdr6 = c6.ExecuteReader();

        GridView6.DataSource = rdr6;
        GridView6.DataBind();
        GridView6.GridLines = GridLines.None;
        rdr6.Close();
        con.Close();

        con.Open();
        SqlCommand    c7   = new SqlCommand("select papername from Publication  where btype='Physics' and published='Yes'", con);
        SqlDataReader rdr7 = c7.ExecuteReader();

        GridView7.DataSource = rdr7;
        GridView7.DataBind();
        GridView7.GridLines = GridLines.None;
        rdr7.Close();
        con.Close();
        con.Open();
        SqlCommand    c8   = new SqlCommand("select papername from Publication  where btype='Material Sciences' and published='Yes'", con);
        SqlDataReader rdr8 = c8.ExecuteReader();

        GridView8.DataSource = rdr8;
        GridView8.DataBind();
        GridView8.GridLines = GridLines.None;
        rdr8.Close();
        con.Close();
        con.Open();
        SqlCommand    c9   = new SqlCommand("select papername from Publication  where btype='Social & Political Science' and published='Yes'", con);
        SqlDataReader rdr9 = c9.ExecuteReader();

        GridView9.DataSource = rdr9;
        GridView9.DataBind();
        GridView9.GridLines = GridLines.None;
        rdr9.Close();
        con.Close();
        con.Open();
        SqlCommand    c10   = new SqlCommand("select papername from Publication  where btype='Earth & Environmental Science' and published='Yes'", con);
        SqlDataReader rdr10 = c10.ExecuteReader();

        GridView10.DataSource = rdr10;
        GridView10.DataBind();
        GridView10.GridLines = GridLines.None;
        rdr10.Close();
        con.Close();
        con.Open();
        SqlCommand    c11   = new SqlCommand("select papername from Publication  where btype='Chemical Engineering' and published='Yes'", con);
        SqlDataReader rdr11 = c11.ExecuteReader();

        GridView11.DataSource = rdr11;
        GridView11.DataBind();
        GridView11.GridLines = GridLines.None;
        rdr11.Close();
        con.Close();
        con.Open();
        SqlCommand    c12   = new SqlCommand("select papername from Publication  where btype='Medical' and published='Yes'", con);
        SqlDataReader rdr12 = c12.ExecuteReader();

        GridView12.DataSource = rdr12;
        GridView12.DataBind();
        GridView12.GridLines = GridLines.None;
        rdr12.Close();
        con.Close();
        con.Open();
        SqlCommand    c13   = new SqlCommand("select papername from Publication  where btype='Agri Food & Aqua' and published='Yes'", con);
        SqlDataReader rdr13 = c13.ExecuteReader();

        GridView13.DataSource = rdr13;
        GridView13.DataBind();
        GridView13.GridLines = GridLines.None;
        rdr13.Close();
        con.Close();
        con.Open();
        SqlCommand    c14   = new SqlCommand("select papername from Publication  where btype='Immunology & Microbiology' and published='Yes'", con);
        SqlDataReader rdr14 = c14.ExecuteReader();

        GridView14.DataSource = rdr14;
        GridView14.DataBind();
        GridView14.GridLines = GridLines.None;
        rdr14.Close();
        con.Close();
        con.Open();
        SqlCommand    c15   = new SqlCommand("select papername from Publication  where btype='Pharmaceutical Sciences' and published='Yes'", con);
        SqlDataReader rdr15 = c15.ExecuteReader();

        GridView15.DataSource = rdr15;
        GridView15.DataBind();
        GridView15.GridLines = GridLines.None;
        rdr15.Close();
        con.Close();
        con.Open();
        SqlCommand    c16   = new SqlCommand("select papername from Publication  where btype='Informatics' and published='Yes'", con);
        SqlDataReader rdr16 = c16.ExecuteReader();

        GridView16.DataSource = rdr16;
        GridView16.DataBind();
        GridView16.GridLines = GridLines.None;
        rdr16.Close();
        con.Close();
        con.Open();
        SqlCommand    c17   = new SqlCommand("select papername from Publication  where btype='Business and Management' and published='Yes'", con);
        SqlDataReader rdr17 = c17.ExecuteReader();

        GridView17.DataSource = rdr17;
        GridView17.DataBind();
        GridView17.GridLines = GridLines.None;
        rdr17.Close();
        con.Close();
    }