コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     TaxUpdateImgTableAdapter TUadptr = new TaxUpdateImgTableAdapter();
     TaxUpdate.TaxUpdateImgDataTable tus = TUadptr.GetFirst(20);
     lblHeading.Text = "Tax Updates";
     dlTaxUpdates.DataSource = tus;
     dlTaxUpdates.DataBind();
 }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            HomeContentsTableAdapter hContentsadptr = new HomeContentsTableAdapter();
            HomeContents.HomeContentsDataTable hContents = hContentsadptr.GetContentByType("Editor Desk", 1);
            foreach (HomeContents.HomeContentsRow row in hContents)
            {
                //int len = 90 - row.Title.Length;
                //if (row.Data.Length > len && len > 0)
                //    row.Data = row.Data.Substring(0, len);

                if (row.Title.Length > 390)
                    row.Title = row.Title.Substring(0, 390);
            }
            // if (hContents.Columns[5].Equals(" "))
            // {

            // }
            dlEditorDesk.DataSource = hContents;
            dlEditorDesk.DataBind();

            HomeContents.HomeContentsDataTable caseContents = hContentsadptr.GetContentByType("Case Analysis", 2);
            foreach (HomeContents.HomeContentsRow row in caseContents)
            {
                //int len = 90 - row.Title.Length;
                //if (row.Data.Length > len && len > 0)
                //    row.Data = row.Data.Substring(0, len);
                if (row.Title.Length > 250)
                    row.Title = row.Title.Substring(0, 250);
            }
            dlCaseAnalysis.DataSource = caseContents;
            dlCaseAnalysis.DataBind();

            TaxUpdateImgTableAdapter tuAdapter = new TaxUpdateImgTableAdapter();
            dlTaxUpdate.DataSource = tuAdapter.GetFirst(1);
            dlTaxUpdate.DataBind();

               // HtmlImage delete = (HtmlImage)dlTaxUpdate.Items[0].FindControl("nonimg");
               // delete.Visible = false;
        }