| Server IP : 104.21.93.206  /  Your IP : 172.69.214.234 Web Server : Microsoft-IIS/10.0 System : Windows NT WAVE 10.0 build 20348 (Windows Server 2016) AMD64 User : IWPD_458(indias) ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/inetpub/vhosts/indiasmartbazaar.com/pimsharyana.in/ | 
| Upload File : | 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class Administrative : System.Web.UI.Page
{
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            GetAdmin();
            getphysio();
            getphysio2();
            getNotice();
        }
    }
    private void getNotice()
    {
        SqlCommand cmd = new SqlCommand("Select * from tbl_department_notice where department='Administrative' order By ID Desc", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if(Dt.Rows.Count>0)
        {
            //DataList1.DataSource = Dt;
            //DataList1.DataBind();
        }
    }
    private void getphysio()
    {
        SqlCommand cmd = new SqlCommand("Select * from tbl_Department Where Department='Administrative'", con);
     
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if (Dt.Rows.Count > 0)
        {
           
            adminimg.Src = Dt.Rows[0]["imagePath"].ToString();
            lblname.Text=Dt.Rows[0]["Title"].ToString();
            lbldes.Text = Dt.Rows[0]["Designation"].ToString(); 
          
        }
    }
    private void getphysio2()
    {
        SqlCommand cmd = new SqlCommand("Select * from tbl_Department_without_image Where Department='Administrative'", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if (Dt.Rows.Count > 0)
        {
            GridView1.DataSource = Dt;
            GridView1.DataBind();
        }
    }
    private void GetAdmin()
    {
        SqlCommand cmd = new SqlCommand("Select * from tbl_adminstrative Order By ID DESC", con);
        SqlDataAdapter DA = new SqlDataAdapter(cmd);
        DataTable Dt = new DataTable();
        DA.Fill(Dt);
        if(Dt.Rows.Count>0)
        {
          
        }
    }
}