Exemplo n.º 1
0
        private void BindCountrySite()
        {
            DataSet dataset = sitecode.GetSiteCodeFinalData();

            GridView gv = new GridView();

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


            for (int row = 0; row < dataset.Tables[0].Rows.Count; row++)
            {
                if (dataset.Tables[0].Rows[row][1].ToString() == DDRSessionEntity.Current.SiteCode)
                {
                    DDRSessionEntity.Current.CountryCode = dataset.Tables[0].Rows[row][2].ToString();
                }
            }
        }
Exemplo n.º 2
0
        protected DataTable sitecodebindtableheader()
        {
            DataTable sctable = new DataTable();

            sctable.Columns.Add("SAPID", typeof(string));
            sctable.Columns.Add("Site Code", typeof(string));
            sctable.Columns.Add("ISO Code", typeof(string));
            sctable.Columns.Add("Description", typeof(string));

            DataSet datasettotable = sitecode.GetSiteCodeFinalData();
            DataRow scrow;

            for (int row = 0; row < datasettotable.Tables[0].Rows.Count; row++)
            {
                scrow                = sctable.NewRow();
                scrow["SAPID"]       = datasettotable.Tables[0].Rows[row][0];
                scrow["Site Code"]   = datasettotable.Tables[0].Rows[row][1];
                scrow["ISO Code"]    = datasettotable.Tables[0].Rows[row][2];
                scrow["Description"] = datasettotable.Tables[0].Rows[row][3];
                sctable.Rows.Add(scrow);
            }
            return(sctable);
        }