public void databind() { try { int c = 1; string str = "select top 10 * from product where _special_offer=" + c + ""; DataSet ds = DB.dataSet(str); Repeater4.DataSource = ds.Tables[0]; Repeater4.DataBind(); /*----------------- hot--------------*/ string str2 = @"select * from product where _id in (select top 10 _product_id from orderdetail group by _product_id order by sum(_product_count) )"; DataSet ds2 = DB.dataSet(str2); Repeater2.DataSource = ds2; Repeater2.DataBind(); /*----------------- time--------------*/ string str3 = "select top 10 * from product order by _id desc"; DataSet ds3 = DB.dataSet(str3); Repeater3.DataSource = ds3.Tables[0]; Repeater3.DataBind(); } catch { } }
protected void Page_Load(object sender, EventArgs e) { DataSet1TableAdapters.HAKKIMDATableAdapter dt = new DataSet1TableAdapters.HAKKIMDATableAdapter(); Repeater1.DataSource = dt.HakkımdaListele(); Repeater1.DataBind(); DataSet1TableAdapters.DENEYIMTableAdapter dt1 = new DataSet1TableAdapters.DENEYIMTableAdapter(); Repeater2.DataSource = dt1.DeneyimListele(); Repeater2.DataBind(); DataSet1TableAdapters.EGITIMTableAdapter dt2 = new DataSet1TableAdapters.EGITIMTableAdapter(); Repeater3.DataSource = dt2.EgitimListesi(); Repeater3.DataBind(); DataSet1TableAdapters.YETENEKLERTableAdapter dt3 = new DataSet1TableAdapters.YETENEKLERTableAdapter(); Repeater4.DataSource = dt3.YetenekListele(); Repeater4.DataBind(); DataSet1TableAdapters.HOBILERTableAdapter dt4 = new DataSet1TableAdapters.HOBILERTableAdapter(); Repeater5.DataSource = dt4.HobiListesi(); Repeater5.DataBind(); DataSet1TableAdapters.KONFERANSTableAdapter dt5 = new DataSet1TableAdapters.KONFERANSTableAdapter(); Repeater6.DataSource = dt5.KonferansListele(); Repeater6.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rpSlider.DataSource = tinMoi.getTop5LasterPost(); rpSlider.DataBind(); rpLasterPost.DataSource = tinMoi.getTop5LasterPost(); rpLasterPost.DataBind(); rpMostPop.DataSource = tinMoi.getTop5PopularPost(); rpMostPop.DataBind(); Repeater4.DataSource = tinMoi.getTop6LasterPost(); Repeater4.DataBind(); Image2.ImageUrl = tinMoi.getFisrt_4_typeNews().cover; HyperLink2.NavigateUrl = "/"; HyperLink2.Text = tinMoi.getFisrt_4_typeNews().title; Label3.Text = tinMoi.getFisrt_4_typeNews().tomTat; Image3.ImageUrl = tinMoi.getFisrt_5_typeNews().cover; HyperLink3.NavigateUrl = "/"; HyperLink3.Text = tinMoi.getFisrt_5_typeNews().title; Label4.Text = tinMoi.getFisrt_5_typeNews().tomTat; } }
protected void Page_Load(object sender, EventArgs e) { DataSetTableAdapters.TBLHAKKIMDATableAdapter dt = new DataSetTableAdapters.TBLHAKKIMDATableAdapter(); Repeater1.DataSource = dt.HakkimdaListele(); Repeater1.DataBind(); DataSetTableAdapters.TBLDENEYIMTableAdapter dtDeneyim = new DataSetTableAdapters.TBLDENEYIMTableAdapter(); Repeater2.DataSource = dtDeneyim.DeneyimListesi(); Repeater2.DataBind(); DataSetTableAdapters.TBLEGITIMTableAdapter dtEgitim = new DataSetTableAdapters.TBLEGITIMTableAdapter(); Repeater3.DataSource = dtEgitim.EgitimListesi(); Repeater3.DataBind(); DataSetTableAdapters.TBLHOBILERTableAdapter dtHobiler = new DataSetTableAdapters.TBLHOBILERTableAdapter(); Repeater5.DataSource = dtHobiler.HobilerListele(); Repeater5.DataBind(); DataSetTableAdapters.TBLODULLERTableAdapter dtOdul = new DataSetTableAdapters.TBLODULLERTableAdapter(); Repeater6.DataSource = dtOdul.OdulListesi(); Repeater6.DataBind(); DataSetTableAdapters.TBLYETENEKLERTableAdapter dtYetenek = new DataSetTableAdapters.TBLYETENEKLERTableAdapter(); Repeater4.DataSource = dtYetenek.YetenekListesi(); Repeater4.DataBind(); DataSetTableAdapters.TBLHAKKIMDATableAdapter dtFotograf = new DataSetTableAdapters.TBLHAKKIMDATableAdapter(); Repeater8.DataSource = dtFotograf.HakkimdaListele(); Repeater8.DataBind(); }
protected void OnUpdate(object sender, EventArgs e) { //Find the reference of the Repeater Item. RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem; int ID = int.Parse((item.FindControl("lblID") as Label).Text); string subject = (item.FindControl("txtSubj") as TextBox).Text.Trim(); string homework = (item.FindControl("txtHomework") as TextBox).Text.Trim(); var checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault(); checkHomework.Subject = subject; checkHomework.Homework1 = homework; db.SubmitChanges(); Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); Repeater6.DataBind(); Repeater7.DataBind(); Repeater8.DataBind(); Repeater8.DataBind(); Repeater9.DataBind(); Repeater10.DataBind(); Repeater11.DataBind(); Repeater12.DataBind(); Repeater13.DataBind(); Repeater14.DataBind(); Repeater15.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { DataSet1TableAdapters.HakkimdaTableAdapter dt = new DataSet1TableAdapters.HakkimdaTableAdapter(); Repeater1.DataSource = dt.HakkimdaListele(); Repeater1.DataBind(); DataSet1TableAdapters.DeneyimlerTableAdapter dt2 = new DataSet1TableAdapters.DeneyimlerTableAdapter(); Repeater2.DataSource = dt2.DeneyimListesi(); Repeater2.DataBind(); DataSet1TableAdapters.EgitimTableAdapter dt3 = new DataSet1TableAdapters.EgitimTableAdapter(); Repeater3.DataSource = dt3.EgitimListele(); Repeater3.DataBind(); DataSet1TableAdapters.OdullerimTableAdapter dt4 = new DataSet1TableAdapters.OdullerimTableAdapter(); Repeater4.DataSource = dt4.OdullerimListele(); Repeater4.DataBind(); DataSet1TableAdapters.HobilerimTableAdapter dt5 = new DataSet1TableAdapters.HobilerimTableAdapter(); Repeater5.DataSource = dt5.HobilerListele(); Repeater5.DataBind(); DataSet1TableAdapters.YeteneklerimTableAdapter dt6 = new DataSet1TableAdapters.YeteneklerimTableAdapter(); Repeater6.DataSource = dt6.YeteneklerimDoldur(); Repeater6.DataBind(); }
private void llenarvista() { Repeater3.DataSource = ord.Consultarordenesencuro(); Repeater3.DataBind(); Repeater4.DataSource = ord.Consultarordenescerradas(); Repeater4.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string strQuery = ""; if (Request.QueryString["Id"] != null) { strQuery = Request.QueryString["Id"].ToString(); } Call_Database ChapelDB = new Call_Database(); Repeater1.DataSource = ChapelDB.dbChapelBuilding; Repeater1.DataBind(); Repeater2.DataSource = ChapelDB.dbHarmonyWall; Repeater2.DataBind(); Repeater3.DataSource = ChapelDB.dbHopeWall; Repeater3.DataBind(); Repeater4.DataSource = ChapelDB.dbFaithWall; Repeater4.DataBind(); Repeater5.DataSource = ChapelDB.dbGraceWall; Repeater5.DataBind(); Repeater6.DataSource = ChapelDB.dbPeaceWall; Repeater6.DataBind(); Repeater7.DataSource = ChapelDB.dbChairsBenches; Repeater7.DataBind(); }
/// <summary> /// 签证工作量汇总表 /// </summary> private void Bindqzgzlhzb() { string strsql = "select * from tunnel_newstype where IsDel=0 and parentid=22"; DataSet das = Tunnel.Data.DbHelperSQL.Query(strsql); if (das.Tables[0].Rows.Count > 0) { Repeater11.DataSource = das; Repeater11.DataBind(); Repeater11.Visible = true; string strsql2 = "select top " + gettop(8 - das.Tables[0].Rows.Count) + " * from tunnel_index where typeid=22 and del=0 and IsDel=0 order by setdate desc "; DataSet das2 = Tunnel.Data.DbHelperSQL.Query(strsql2); Repeater4.DataSource = das2; Repeater4.DataBind(); } else { string strsql2 = "select top 8 * from tunnel_index where typeid=22 and del=0 and IsDel=0 order by setdate desc"; DataSet das2 = Tunnel.Data.DbHelperSQL.Query(strsql2); Repeater4.DataSource = das2; Repeater4.DataBind(); Repeater4.Visible = true; Repeater11.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { //DataSet is an in-memory cache of data retrieved from a data source //step 1: create Dataset with a GET method DataSet datathriller = GetDataThriller(); DataSet datafiction = GetDataFiction(); DataSet datapaperbacks = GetDataPaperbacks(); DataSet datayoungreaders = GetDataYoungReaders(); DataSet datateens = GetDataTeens(); //DataSource is used to pull the data from the database and populate them //step 8: pull data using DataSource Repeater1.DataSource = datathriller; Repeater2.DataSource = datafiction; Repeater3.DataSource = datapaperbacks; Repeater4.DataSource = datayoungreaders; Repeater5.DataSource = datateens; //step 9: bind the data to the repeater Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Label1.Text = Session["user"].ToString(); ArrayList names = new ArrayList { "@user" }; ArrayList values = new ArrayList { Session["user"].ToString() }; DataSet ds = Database.RunSP("sp_icons_selectSome", names, values); Repeater1.DataSource = ds; Repeater1.DataBind(); //Response.Write(Session["user"]); ArrayList names1 = new ArrayList { }; ArrayList values1 = new ArrayList { }; //this is the table from the recommended sites DataSet ds1 = Database.RunSP("sp_Rec_selectAll", names1, values1); Repeater2.DataSource = ds1; Repeater2.DataBind(); Repeater3.DataSource = ds1; Repeater3.DataBind(); Repeater4.DataSource = ds1; Repeater4.DataBind(); }
protected void BindNewTalk() { DataTable m_dt = QA_CategoryBll.GetInstance().GetCates(2); Repeater4.DataSource = m_dt; Repeater4.DataBind(); }
protected void bindNew() { DataTable dt = b_Ask.Sel("Status=1", "ID desc", null); Repeater4.DataSource = dt; Repeater4.DataBind(); }
protected void OnDelete(object sender, EventArgs e) { //Find the reference of the Repeater Item. RepeaterItem item = (sender as LinkButton).Parent as RepeaterItem; int ID = int.Parse((item.FindControl("lblID") as Label).Text); var checkHomework = (from c in db.Homeworks where c.ID.Equals(ID) select c).FirstOrDefault(); db.Homeworks.DeleteOnSubmit(checkHomework); db.SubmitChanges(); Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); Repeater6.DataBind(); Repeater7.DataBind(); Repeater8.DataBind(); Repeater8.DataBind(); Repeater9.DataBind(); Repeater10.DataBind(); Repeater11.DataBind(); Repeater12.DataBind(); Repeater13.DataBind(); Repeater14.DataBind(); Repeater15.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { DataSet1TableAdapters.TBLHAKKIMDATableAdapter dt = new DataSet1TableAdapters.TBLHAKKIMDATableAdapter(); Repeater1.DataSource = dt.HakkımdaListele(); Repeater1.DataBind(); DataSet1TableAdapters.TBLDENEYIMTableAdapter dt2 = new DataSet1TableAdapters.TBLDENEYIMTableAdapter(); Repeater2.DataSource = dt2.DeneyimListesi(); Repeater2.DataBind(); DataSet1TableAdapters.TBLEGITIMTableAdapter dt3 = new DataSet1TableAdapters.TBLEGITIMTableAdapter(); Repeater3.DataSource = dt3.EgitimListesi(); Repeater3.DataBind(); DataSet1TableAdapters.TBLYETENEKLERTableAdapter dt4 = new DataSet1TableAdapters.TBLYETENEKLERTableAdapter(); Repeater4.DataSource = dt4.YetenekListesi(); Repeater4.DataBind(); DataSet1TableAdapters.TBLHOBILERTableAdapter dt5 = new DataSet1TableAdapters.TBLHOBILERTableAdapter(); Repeater5.DataSource = dt5.HobiListesi(); Repeater5.DataBind(); DataSet1TableAdapters.TBLKULUPLERTableAdapter dt6 = new DataSet1TableAdapters.TBLKULUPLERTableAdapter(); Repeater6.DataSource = dt6.KuluplerListesi(); Repeater6.DataBind(); DataSet1TableAdapters.TBLHAKKIMDATableAdapter dt7 = new DataSet1TableAdapters.TBLHAKKIMDATableAdapter(); Repeater7.DataSource = dt7.HakkımdaListele(); Repeater7.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { //last week SqlDataSource2.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource3.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource4.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource5.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource6.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; //this week SqlDataSource7.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource8.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource9.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource10.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource11.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; //next week SqlDataSource12.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource13.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource14.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource15.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; SqlDataSource16.SelectParameters["UserClass"].DefaultValue = RadioButtonList1.SelectedValue; Repeater1.DataBind(); Repeater2.DataBind(); Repeater3.DataBind(); Repeater4.DataBind(); Repeater5.DataBind(); Repeater6.DataBind(); Repeater7.DataBind(); Repeater8.DataBind(); Repeater8.DataBind(); Repeater9.DataBind(); Repeater10.DataBind(); Repeater11.DataBind(); Repeater12.DataBind(); Repeater13.DataBind(); Repeater14.DataBind(); Repeater15.DataBind(); }
//protected void BtnRiSub_Click(object sender, EventArgs e) //{ // //string SQLString = "BKID,WiEWID,WiName,WiUnit,BWI,WiQuantity,WiPrice,WiComplex,ItemAmount,Remain"; // string SQLString = "BKID,SB_MID,SBID,ItemName,Unit,BelongEWID,BelongItem,SCNumber,UnitPrice,DelTemp,AddTemp"; // DataTable DataTableBox = new DataTable(); // foreach (string DataName in SQLString.Split(',')) // { // DataTableBox.Columns.Add(DataName, typeof(string)); // } // //後台功能,必需要有的欄位名稱 // DataRow DataTableDr; // //foreach (RepeaterItem item in Repeater5.Items) // //{ // DataTableDr = DataTableBox.NewRow(); // //if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem) // //{ // //Label LbBKID = item.FindControl("LbBKID") as Label; // //Label LbItemOrder = item.FindControl("LbItemOrder") as Label; // //Label LbItemName = item.FindControl("LbItemName") as Label; // //Label LbUnit = item.FindControl("LbUnit") as Label; // //Label LbRiPrice = item.FindControl("LbRiPrice") as Label; // //Label LbItemAmount = item.FindControl("LbItemAmount") as Label; // //Label LbRemain = item.FindControl("LbRemain") as Label; // DataTableDr["BKID"] = LbBKID.Text; // DataTableDr["ItemName"] = LbRiItemname.Text; // DataTableDr["Unit"] = LbRiUnit.Text; // DataTableDr["BelongItem"] = "全資源分包"; // DataTableDr["SCNumber"] = LbRemain.Text !=""?decimal.Parse(LbRemain.Text).ToString("N0"):"0"; // DataTableDr["UnitPrice"] = LbRiPrice.Text !=""?LbRiPrice.Text:"0"; // DataTableBox.Rows.Add(DataTableDr); // // } // //} // Session["itemRiAll"] = DataTableBox; // Response.Write("<script>window.opener.document.getElementById('ContentPlaceHolder1_Self').click();self.close()</script>"); //} //protected void Repeater5_ItemDataBound(object sender, RepeaterItemEventArgs e) //{ // if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) // { // DataRow vsDr = (DataRow)((DataRowView)e.Item.DataItem).Row; // string database = Session["DatabaseName"].ToString(); // Label LbItemOrder = (Label)e.Item.FindControl("LbItemOrder"); // Label LbEwid = (Label)e.Item.FindControl("LbEwid"); // Label LbItemAmount = e.Item.FindControl("LbItemAmount") as Label; // Label LbRemain = e.Item.FindControl("LbRemain") as Label; // string SQLselect1 = "Select * from EBudget_WBS where EWID=" + LbEwid.Text + ""; // LbItemOrder.Text = WebModel.SItemName(database, SQLselect1, "ItemOrder"); // if (flag == false) // { // BtnRiSub.Text = "全資源存入分包工料"; // BtnRiSub.Enabled = true; // } // if (decimal.Parse(LbItemAmount.Text) != decimal.Parse(LbRemain.Text)) // { // BtnRiSub.Text = "此資源已有其他分包,無法進行全資源分包"; // BtnRiSub.Enabled = false; // flag = true; // } // } //} //protected void BtnClearWi1_Click(object sender, EventArgs e) //{ // LbWItemName.Text = ""; // LbWUnit.Text = ""; // LbAnalyst.Text = ""; // LbWQuantity.Text = ""; // LbWPrice.Text = ""; // TextBox16.Text = ""; // SqlDataSource3.SelectCommand = ""; // Repeater3.DataBind(); //} protected void BtnClearRi_Click(object sender, EventArgs e) { LbRiItemName1.Text = ""; LbRiUnit1.Text = ""; LbRiAmount.Text = ""; EUnitPrice.Text = ""; SqlDataSource4.SelectCommand = ""; Repeater4.DataBind(); }
private void MyDataBind3() { AspNetPager2.PageSize = Convert.ToInt16(PageSizeDDL2.SelectedValue); string whereStr = " where CatID = @CatID and Status = 1 and Finished = 1 and Valid = 1 and IsList = 1"; string sql = "select count(ID) as total from Articles " + whereStr; using (SqlConnection conn = (SqlConnection) new DB().GetConnection()) { SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = sql; cmd.Parameters.AddWithValue("@CatID", CategoryIDLabel.Text); conn.Open(); SqlDataReader rd = cmd.ExecuteReader(); if (rd.Read()) { AspNetPager2.RecordCount = Convert.ToInt16(rd[0]); } else { AspNetPager2.RecordCount = 0; } rd.Close(); //RecordCountLabel.Text = AspNetPager1.RecordCount + "";//总记录数 TotalPagesLabel2.Text = (AspNetPager2.RecordCount / AspNetPager2.PageSize) + 1 + "";//总页数 if (AspNetPager2.RecordCount / AspNetPager2.PageSize < 1) { AspNetPager2.Visible = false; } else { AspNetPager2.Visible = true; } whereStr = " where CatID = @CatID2 and Status = 1 and Finished = 1 and Valid = 1 and IsList = 1 "; if (AspNetPager2.CurrentPageIndex == 1) { sql = "Select top " + AspNetPager2.PageSize + " * from Articles " + whereStr + " Order by Orders Desc,CDT Desc,ID Desc"; } else { // Select Top 页容量 * from 表 where 条件 and id not in (Select Top 页容量*(当前页数-1) id from 表 where 条件 order by 排序条件) order by 排序条件 sql = "Select top " + AspNetPager2.PageSize + " * from Articles " + whereStr + " and id not in ( select top " + AspNetPager2.PageSize * (AspNetPager2.CurrentPageIndex - 1) + " id from Articles " + whereStr + " Order by Orders Desc,CDT Desc,ID Desc" + " ) " + " Order by Orders Desc,CDT Desc,ID Desc"; //sql = "SELECT * FROM (SELECT ROW_NUMBER() OVER ( " + orderStr + ") AS MyRank,* FROM Article " + whereStr +" ) AS Rank " + whereStr + " and MyRank BETWEEN " +AspNetPager1.StartRecordIndex+" AND "+ (AspNetPager1.StartRecordIndex+AspNetPager1.PageSize-1) +orderStr; } //TestLabel.Text = sql; cmd.CommandText = sql; cmd.Parameters.AddWithValue("@CatID2", CategoryIDLabel.Text); rd = cmd.ExecuteReader(); Repeater4.DataSource = rd; Repeater4.DataBind(); rd.Close(); } }
///<summary> /// 帮定分页数据 ///</summary> /// void BindData(string key = null) { IEnumerable <书名表> ListSource = new List <书名表>(); ListSource = Tygdb.书名表.Where(p => p.包含有效章节 != null && p.包含有效章节 > 0).OrderByDescending(p => p.最后更新时间); //ShowNews.DataSource = ListSource; //ShowNews.DataBind(); //每一个分类取最新的一条记录 var docs = Tygdb.ExecuteStoreQuery <NewDocItem>(@" select d.ID,d.本记录GUID,d.GUID,d.书名 into #doc from ( select top 100 [GUID] from 书名表 where 包含有效章节 > 0 order by 最后更新时间 desc ) as doctype left join ( SELECT * from 文章表 ) d on d.[GUID]=doctype.[GUID] select * from (select *,row=row_number()over(partition by [GUID] order by ID desc) from #doc)t where row=1 and t.id>0 drop table #doc "); decimal[] ids = docs.Select(p => p.ID).ToArray(); //使用了in var topDocs = Tygdb.文章表.Where(p => ids.Contains(p.ID)).OrderByDescending(p => p.ID).ToList().Where( //确保章节是有效的 p => string.Join("", System.Text.RegularExpressions.Regex.Matches(p.内容, @"[\u4e00-\u9fa5\d\w123456789~!!·#¥%……—*()——+/”》“‘’,;。、?,:…《]+[\u4e00-\u9fa5123456789~!!·#¥%……—*(!)——+/”》“‘,’\r\n;。、?,:…《]", System.Text.RegularExpressions.RegexOptions.Multiline) .Cast <System.Text.RegularExpressions.Match>().Select(x => x.Value).ToArray() ).Length > 200 ); topDocs = topDocs.ToList().Where(p => System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory + p.GetHTMLFilePath())).ToList(); Docs1.DataSource = topDocs.Take(6); Docs1.DataBind(); Repeater1.DataSource = topDocs.Skip(6 * 1).Take(6); Repeater1.DataBind(); Repeater2.DataSource = topDocs.Skip(6 * 2).Take(6); Repeater2.DataBind(); Repeater3.DataSource = topDocs.Skip(6 * 3).Take(6); Repeater3.DataBind(); Repeater4.DataSource = topDocs.Skip(6 * 4).Take(6); Repeater4.DataBind(); Repeater5.DataSource = topDocs.Skip(6 * 5).Take(6); Repeater5.DataBind(); BindTopBook(); }
public void entertainment() { DataTable dt = ad.gettop4entertainmentgadgets(); if (dt.Rows.Count != 0) { Repeater4.DataSource = dt; Repeater4.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { Repeater1.DataSource = _aboutService.GetList(); Repeater1.DataBind(); Repeater2.DataSource = _aboutService.GetList(); Repeater2.DataBind(); Repeater3.DataSource = _aboutService.GetList(); Repeater3.DataBind(); Repeater4.DataSource = _skilService.GetList(); Repeater4.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Repeater1.DataSource = db.TblHakkimda.ToList(); Repeater1.DataBind(); Repeater2.DataSource = db.TblHakkimda.ToList(); Repeater2.DataBind(); Repeater3.DataSource = db.TblHakkimda.ToList(); Repeater3.DataBind(); Repeater4.DataSource = db.TblYetenekler.ToList(); Repeater4.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Permissions.ComRedirect(Page, Permissions.redirUrl); Response.Cache.SetExpires(DateTime.Now); Permissions.CheckManagePermission(6313); if (!IsPostBack && Request.QueryString["action"] == null) { Repeater1.DataSource = WTreeBLL.GetWLTField("1", "0"); Repeater1.DataBind(); Repeater4.DataSource = WTreeBLL.GetWLTField("1", "1"); Repeater4.DataBind(); Repeater2.DataSource = WTreeBLL.GetWLTField("2", "0"); Repeater2.DataBind(); Repeater5.DataSource = WTreeBLL.GetWLTField("2", "1"); Repeater5.DataBind(); Repeater3.DataSource = WTreeBLL.GetWLTField("3", "0"); Repeater3.DataBind(); Repeater6.DataSource = WTreeBLL.GetWLTField("3", "1"); Repeater6.DataBind(); } if (Request.QueryString["action"] == "save") { string f = Request.QueryString["field"]; string v = Request.QueryString["visible"]; string id = Request.QueryString["id"]; //if (id == "1") //{ // if (f.IndexOf("|") == -1) // { // Response.Write(GetTran("007953", "修改失败,必须要有“|”符号!")); // Response.End(); // return; // } //} int hs = WTreeBLL.UpdWLTField(f, v, id); if (hs == 2) { Response.Write(GetTran("000222", "修改成功!")); } else { Response.Write(GetTran("000225", "修改失败!")); } Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { Repeater1.DataSource = db.TBLHAKKIMDA.ToList(); Repeater1.DataBind(); Repeater2.DataSource = db.TBLHAKKIMDA.ToList(); Repeater2.DataBind(); Repeater3.DataSource = db.TBLHAKKIMDA.ToList(); Repeater3.DataBind(); Repeater4.DataSource = db.TBLYETENEKLER.ToList(); Repeater4.DataBind(); }
public void FetchingFriendsDetails() { SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@userid", SqlDbType.Int); param[0].Value = Session["id"]; ds = objdf.FillDsParam("usp_FetchFriendsdDetails", param); Repeater4.DataSource = ds; Repeater4.DataBind(); Count_4(); }
private void bind4() { co.connect(); string sql = "select top 7 title,albummovie,img,id,singer from maintable order by newid()"; da = new SqlDataAdapter(sql, co.con); ds = new DataSet(); da.Fill(ds); Repeater4.DataSource = ds.Tables[0].DefaultView; Repeater4.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { Repeater1.DataSource = db.Abouts.ToList(); Repeater1.DataBind(); Repeater2.DataSource = db.Abouts.ToList(); Repeater2.DataBind(); Repeater3.DataSource = db.Abouts.ToList(); Repeater3.DataBind(); Repeater4.DataSource = db.Abilities.ToList(); Repeater4.DataBind(); }
/*工作动态*/ protected void bindtorepeater4() { try { string sql = "select top 5 * from message where cl1_id=2 order by datatime desc"; Repeater4.DataSource = mydo.rows(sql, "dt"); Repeater4.DataBind(); } catch (Exception error) { Response.Write(error.Message.ToString()); } }
public void fillsimiliar(int id) { DataTable dt = ad.fillsimiliar(id); if (dt.Rows.Count == 0) { } else { Repeater4.DataSource = dt; Repeater4.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(@"Data Source=ADMIN\SQLEXPRESS;Initial Catalog=vegefoods;Integrated Security=True"); string sQuery = ""; sQuery = "Select * from Food where status=1"; DataTable dt = new DataTable(); dt = DataProvider.getDataTable(sQuery); int so_item_1trang = 3; int so_trang = dt.Rows.Count / so_item_1trang + (dt.Rows.Count % so_item_1trang == 0 ? 0 : 1); int page = Request["page"] == null ? 1 : Convert.ToInt32(Request["page"]); int from = (page - 1) * 3; int to = page * 3 - 1; for (int i = dt.Rows.Count - 1; i >= 0; i--) { if (i < from || i > to) { dt.Rows.RemoveAt(i); } } if (!IsPostBack) { Repeater3.DataSource = dt; Repeater3.DataBind(); } DataTable dtPage = new DataTable(); dtPage.Columns.Add("index"); dtPage.Columns.Add("active"); for (int i = 1; i <= so_trang; i++) { DataRow dr = dtPage.NewRow(); dr["index"] = i; if ((Request["page"] == null && i == 1) || (Request["page"] != null && Convert.ToInt32(Request["page"]) == i)) { dr["active"] = 1; } else { dr["active"] = 0; } dtPage.Rows.Add(dr); } Repeater4.DataSource = dtPage; Repeater4.DataBind(); }