protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["loginName"] == null)
            {
                //Response.Write("<script>this.parent.location.href='../Default.aspx'</script>");
                Response.Redirect("~/Default.aspx");
                return;
            }
            department dept = new department();

            GridView1.DataSource = dept.SelectAllDepartment();
            GridView1.DataKeyNames = new String[] { "ID" };
            GridView1.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["loginName"] == null)
            {
                //Response.Write("<script>this.parent.location.href='../Default.aspx'</script>");
                Response.Redirect("~/Default.aspx");
                return;
            }

            if (!IsPostBack)
            {
                //imgBtnSave.Attributes.Add("onclick", "GetArea()");
                department dept = new department();
                dlDepartment.DataSource = dept.SelectAllDepartment();
                dlDepartment.DataBind();
                //Page.ClientScript.RegisterArrayDeclaration("IDArray", string.Format("'{0}'", HiddenField1.ClientID));
            }
        }