示例#1
0
        private void BindGrid()
        {
            string    filePath = ConfigurationManager.AppSettings["NHIS"];
            string    path     = Server.MapPath(filePath);
            DataTable dt       = new DataTable("Study");

            if (path != null)
            {
                try
                {
                    //Add Columns in datatable - Column names must match XML File nodes
                    dt.Columns.Add("Id", typeof(System.String));
                    dt.Columns.Add("Name", typeof(System.String));
                    dt.Columns.Add("FileExists", typeof(System.String));

                    // Reading the XML file and display data in the gridview
                    dt.ReadXml(path);
                }
                catch (Exception e)
                {
                    throw e;
                }
            }

            //GridViewStudy.DataSource = dt;
            GridViewStudy.DataSource = dt;
            GridViewStudy.DataBind();

            GridViewStudy.HeaderRow.TableSection = TableRowSection.TableHeader;
        }
示例#2
0
        void BindData()
        {
            PS_STUDY  PStudy = new PS_STUDY();
            DataTable dt1    = PStudy.SELECT_PS_STUDY("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "");

            GridViewStudy.DataSource = dt1;
            GridViewStudy.DataBind();
            SetViewState(dt1);

            PS_PRO_LICENSE PLicense = new PS_PRO_LICENSE();
            DataTable      dt2      = PLicense.SELECT_PS_PRO_LICENSE("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "");

            GridViewLicense.DataSource = dt2;
            GridViewLicense.DataBind();
            SetViewState(dt2);

            PS_TRAINING Training = new PS_TRAINING();
            DataTable   dt3      = Training.SELECT_PS_TRAINING("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "");

            GridViewTraining.DataSource = dt3;
            GridViewTraining.DataBind();
            SetViewState(dt3);

            PS_PUNISHMENT Punishment = new PS_PUNISHMENT();
            DataTable     dt4        = Punishment.SELECT_PS_PUNISHMENT("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "");

            GridViewPunish.DataSource = dt4;
            GridViewPunish.DataBind();
            SetViewState(dt4);

            PS_POSI_AND_SALARY PosiSalary = new PS_POSI_AND_SALARY();
            DataTable          dt5        = PosiSalary.SELECT_PS_POSI_AND_SALARY("", MyCrypto.GetDecryptedQueryString(Request.QueryString["id"].ToString()), "", "", "", "", "", "", "", "");

            GridViewPosiSalary.DataSource = dt5;
            GridViewPosiSalary.DataBind();
            SetViewState(dt5);
        }
示例#3
0
 protected void myGridViewStudy_PageIndexChanging1(object sender, GridViewPageEventArgs e)
 {
     GridViewStudy.PageIndex  = e.NewPageIndex;
     GridViewStudy.DataSource = GetViewState();
     GridViewStudy.DataBind();
 }