富华巴克网

生活百科全书

gridview控件(gridview控件功能)

我的一个GridView操作文件,数据源是实体LIST,删改查功能都有了,你参考下 using System; using System.Collections; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using lwf_MVC.CTRL; using lwf_MVC.lwf_Normal; using lwf_MVC.MODEL; public partial class admin_news_edit : System.Web.UI.Page { public string icls_name = "cls_f_news"; //不同级数系列区别在于iWhere public string iWhere = " 1 = 1 and ENG = " + WEB.GQ("ENG", "0") + " and TID1 = " + WEB.GQ("SSS", "1") + " and 1 = 1"; public int getRecordCount() { cls_f_news if_news = (cls_f_news)CTRL.CreateModel(icls_name); if_news.title = soKey.Text; if_news.contents = soKey.Text; if_news.WHERE = iWhere; int i_recordcount = CTRL.getCount(if_news, "order by orderid,id desc"); return i_recordcount; } protected void Page_Load(object sender, EventArgs e) { if (WEB.getSession("userName") == null || WEB.getSession("userName") == "") JS.RD(System.Web.HttpUtility.UrlDecode("%e7%99%bb%e9%99%86%e8%b6%85%e6%97%b6%2c%e8%af%b7%e9%87%8d%e6%96%b0%e7%99%bb").Trim(), "../login.aspx"); if (!IsPostBack) { AspNetPagerBin(1); GridViewBin(); } } protected void AspNetPagerBin(int curr) { int i_recordcount = getRecordCount(); AspNetPager1.RecordCount = i_recordcount; AspNetPager1.CurrentPageIndex = curr; } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { GridView1.EditIndex = e.NewEditIndex; GridViewBin(); } protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { GridView1.EditIndex = -1; GridViewBin(); } protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int i_id = int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString()); cls_f_news baseTableObj = (cls_f_news)CTRL.CreateModel(icls_name, i_id); baseTableObj.title = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text.ToString(); baseTableObj.newfrom = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].Controls[0]).Text.ToString(); baseTableObj.addTime = DateTime.Parse(((TextBox)GridView1.Rows[e.RowIndex].Cells[4].Controls[0]).Text.ToString()); baseTableObj.orderid = int.Parse(((TextBox)GridView1.Rows[e.RowIndex].FindControl("tb_orderid_b")).Text.ToString()); if (CTRL.Update(baseTableObj)) { JS.alert(System.Web.HttpUtility.UrlDecode("%e4%bf%ae%e6%94%b9%e6%88%90%e5%8a%9f").Trim()); } else { JS.alert(System.Web.HttpUtility.UrlDecode("%e7%bd%91%e7%bb%9c%e8%b6%85%e6%97%b6%ef%bc%8c%e8%af%b7%e9%87%8d%e6%96%b0%e5%86%8d%e8%af%95").Trim()); } //==================================== GridView1.EditIndex = -1; GridViewBin(); } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { int i_id = int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString()); cls_f_news baseTableObj = (cls_f_news)CTRL.CreateModel(icls_name, i_id); if (CTRL.Delete(baseTableObj)) { JS.alert(System.Web.HttpUtility.UrlDecode("%e8%ae%b0%e5%bd%95%e5%88%a0%e9%99%a4%e6%88%90%e5%8a%9f").Trim()); } else { JS.alert(System.Web.HttpUtility.UrlDecode("%e7%bd%91%e7%bb%9c%e8%b6%85%e6%97%b6%ef%bc%8c%e8%af%b7%e9%87%8d%e6%96%b0%e5%86%8d%e8%af%95").Trim()); } //==================================== GridView1.EditIndex = -1; GridViewBin(); } protected void AspNetPager1_PageChanged(object sender, EventArgs e) { GridView1.EditIndex = -1; GridView1.PageIndex = AspNetPager1.CurrentPageIndex; GridViewBin(); } protected void CheckBox_all_CheckedChanged(object sender, EventArgs e) { CheckBox_opp.Checked = false; for (int i_i = 0; i_i <= GridView1.Rows.Count - 1; i_i++) { CheckBox ckb = (CheckBox)GridView1.Rows[i_i].FindControl("cb_selBoxs"); if (CheckBox_all.Checked) { ckb.Checked = true; } else { ckb.Checked = false; } } } protected void CheckBox_opp_CheckedChanged(object sender, EventArgs e) { CheckBox_all.Checked = false; for (int i_i = 0; i_i <= GridView1.Rows.Count - 1; i_i++) { CheckBox ckb = (CheckBox)GridView1.Rows[i_i].FindControl("cb_selBoxs"); if (ckb.Checked) { ckb.Checked = false; } else { ckb.Checked = true; } } } protected void lb_delete_Click(object sender, EventArgs e) { for (int i_i = 0; i_i <= GridView1.Rows.Count - 1; i_i++) { CheckBox ckb = (CheckBox)GridView1.Rows[i_i].FindControl("cb_selBoxs"); if (ckb.Checked) { int i_id = int.Parse(GridView1.DataKeys[i_i].Value.ToString()); cls_f_news baseTableObj = (cls_f_news)CTRL.CreateModel(icls_name, i_id); CTRL.Delete(baseTableObj); } } int i_Pcount = getRecordCount(); if (AspNetPager1.CurrentPageIndex > i_Pcount) { AspNetPagerBin(i_Pcount); } else { AspNetPagerBin(AspNetPager1.CurrentPageIndex); } GridViewBin(); } protected void lb_order_Click(object sender, EventArgs e) { for (int i_i = 0; i_i <= GridView1.Rows.Count - 1; i_i++) { TextBox tb = (TextBox)GridView1.Rows[i_i].FindControl("tb_orderid_a"); int i_id = int.Parse(GridView1.DataKeys[i_i].Value.ToString()); cls_f_news baseTableObj = (cls_f_news)CTRL.CreateModel(icls_name, i_id); baseTableObj.orderid = int.Parse(tb.Text.ToString()); CTRL.Update(baseTableObj); } GridViewBin(); } protected void bt_search_Click(object sender, EventArgs e) { AspNetPagerBin(1); GridViewBin(); } protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { int rowNum; int id_i; } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { } } protected void GridView1_Sorting(object sender, GridViewSortEventArgs e) { string sortExpression = e.SortExpression; ViewState["sortExpression"] = sortExpression; if (ViewState["ASC"].ToString() == "0") { ViewState["ASC"] = "1"; } else { ViewState["ASC"] = "0"; } AspNetPagerBin(1); GridViewBin(); } protected void GridViewBin() { CheckBox_all.Checked = false; cls_f_news if_news = (cls_f_news)CTRL.CreateModel(icls_name); if_news.title = soKey.Text; if_news.contents = soKey.Text; if_news.WHERE = iWhere; int RecordCount; int curP = Convert.ToInt32(AspNetPager1.CurrentPageIndex); List<cls_f_news> iList_f_news = CTRL.getPageList(if_news, "order by orderid,id desc", AspNetPager1.PageSize, curP, out RecordCount).ConvertAll<cls_f_news>(delegate(lwf_MVC.MODEL.baseTable s) { return (cls_f_news)s; }); if (ViewState["ASC"] == null) ViewState["ASC"] = "-1"; if (ViewState["sortExpression"] == null) ViewState["sortExpression"] = "orderid"; if (ViewState["ASC"].ToString() == "-1") { iList_f_news.Sort(delegate(cls_f_news a, cls_f_news b) { return (new CaseInsensitiveComparer()).Compare(a.GetType().GetProperty(ViewState["sortExpression"].ToString()).GetValue(a, null), b.GetType().GetProperty(ViewState["sortExpression"].ToString()).GetValue(b, null)); }); } else { if (ViewState["ASC"].ToString() == "1") { iList_f_news.Sort(delegate(cls_f_news a, cls_f_news b) { return (new CaseInsensitiveComparer()).Compare(a.GetType().GetProperty(ViewState["sortExpression"].ToString()).GetValue(a, null), b.GetType().GetProperty(ViewState["sortExpression"].ToString()).GetValue(b, null)); }); } else { iList_f_news.Sort(delegate(cls_f_news a, cls_f_news b) { return (new CaseInsensitiveComparer()).Compare(b.GetType().GetProperty(ViewState["sortExpression"].ToString()).GetValue(b, null), a.GetType().GetProperty(ViewState["sortExpression"].ToString()).GetValue(a, null)); }); } } GridView1.DataSource = iList_f_news; GridView1.DataKeyNames = new string[] { "id" }; GridView1.DataBind(); } }

windows xp 补丁(winxp补丁合集)

 Windows XP要进入安全模式下安装补丁的话,我们必须得重新启动计算机,在计算机启动到一定位置的时候,按F8按钮。在弹出的菜单当中会出现多种的选项,其中就包括安全模式和不带网络配置的安全模式,直接进入带有网络配置的安全模式下,就可以在线安装windows补丁了。

MSU是微软的补丁文件,微软在Windows6.1(即:Vista以上系统)推出了MSU格式,MSU文件在XP和2003系统上是无法打开的。

msu格式的补丁包是从vista系统开始的(当然win7 也算了),建议使用360来补丁,方便,手工更新比较麻烦,需要用批处理操作一下,下面是手动操作步骤:

超级解霸播放器

分三步:

一、在播放器的控制面板上的进度控制条上方有个小按钮,点击后可使播放的视频变成循环模式二、在播放器的控制面板上的进度控制条上方还有两个小按钮,分别是用来设定你想截取视频片断的头部和尾部,你可以用鼠标拖动进度控制条,在想截取的地方按“暂停”钮,然后按这两个按钮分别设定头和尾三、在播放器的控制面板上的进度控制条上方还有一个小按钮,标着MPG三个字。点一下这个按钮,就会出现保存这个截取视频的窗口了。豪杰所有版本的播放器都可以这么来截视频补充一下:豪杰2001XP版本还有一个自带的功能,就是合并MPG文件。你可以用上述的方法截几个视频后,用它的实用工具集里的带的MPG合并工具将这些小片断合并成一个大的完整的新视频。通过简单的截取和合并,就可以实现简单的视频剪辑功能。

二维码图片制作(二维码图片制作生成器)

单图片:草料二维码生成器里,先注册。首页导航栏点图片,上传生成就好。

图片加文字:草料二维码生成器里,先注册。然后在管理后台——活码里新建活码选择图文,就可以制作了。不过免费版本应该只能一个二维码上传一张图片,不知道对你够不够。

图片上加二维码,可以用美图秀秀,

先打开美图秀秀软件,选择拼图选项。

再点击左上方的箭头按钮,找到存放二维码的文件夹,选择要插入的二维码图片。

然后点击“确认添加”按钮,选择“开始拼图”。

微软小冰官网(微软小冰官博)

步骤/方式1

微软小冰作为搜索助手,其具体使用方法如下,第一步在浏览器中,输入“必应搜索”,进入搜索主页面,必应主页面详细情况如图所示。

主板故障检测软件(主板诊断软件)

不支持超频的主板是可以用软件超频的。英特尔这边有XTU软件可以直接调节CPU倍频,但是如果CPU不支持超频,就不能超频,只能降频。

可以。

1.第一步,点击鲁大师官网上的【立即下载】下载并安装鲁大师电脑版本;

2.接下来,安装【鲁大师】程序后,双击打开程序,点击【硬件检测】。该程序将自动检测计算机的硬件信息。

3.下一步,检测计算机硬件信息大约需要30秒。根据计算机的运行速度,检测后计算机硬件显示将显示出来。

4.接下来,点击左边的【硬盘信息】,在硬盘信息中有一个【接口】参数,是计算机当前硬盘的接口类型。

联想摄像头驱动(联想摄像头驱动更新)

可以通过笔记本电脑的设备管理器,把摄像头驱动禁止即可。


在桌面上找到“我的电脑”,或者“计算机”选项(不同的系统版本,称呼略有区别)。


选中后点击电脑右键,选择设备管理器。


进入新页面后找到“摄像头”选项,然后点击右键展开,找到驱动程序,继续点击右键展开,在弹出的选项,选择“禁用”即可。

要安装联想相机驱动,首先需要下载适用于您的相机型号的驱动程序。然后,双击下载的驱动程序文件,按照提示完成安装向导。

雨林木风vista(雨林木风xp系统纯净版)

雨林木风系统挺好用的。雨林木风系统Ghost封装形式复制系统,具备安全、迅速、稳定性等特征。系统用 Windows XP SP3 MSDN 正版制做,集成化了全新的安全补丁包和其他系统更新程序,能通过微软正版验证,支持在线更新。

系统之家雨林木风对比哪个好呢?许多的用户在网上看到了系统之家和雨林木风的介绍后,都不知道该选择系统之家还是雨林木风好了。系统之家雨林木风都是比较优秀的系统,稳定性、兼容性都是比较好的。下面小编就通过分析系统之家和雨林木风系统的特性来看哪个好吧!

巴特沃斯滤波器(巴特沃斯滤波器设计)

巴特沃斯滤波器的特点是通频带内的频率响应曲线最大限度平坦,没有起伏,而在阻频带则逐渐下降为零。

在振幅的对数对角频率的波特图上,从某一边界角频率开始,振幅随着角频率的增加而逐步减少,趋向负无穷大。

一阶巴特沃斯滤波器的衰减率为每倍频6分贝,每十倍频20分贝。

二阶巴特沃斯滤波器的衰减率为每倍频12分贝、三阶巴特沃斯滤波器的衰减率为每倍频18分贝、如此类推

高通巴特沃斯滤波器在现代设计方法设计的滤波器中,是最为有名的滤波器。

高通巴特沃斯滤波器特点:

usb视频驱动(视频驱动程序)

USB闪存驱动是一种用于与计算机通信的软件组件,它使计算机能够正确识别和与连接的USB闪存驱动器进行通信。它是操作系统中的一个重要部分,负责管理和控制USB闪存驱动器的传输和交互。


USB闪存驱动通过与操作系统的设备管理器进行交互,将USB闪存驱动器识别为可用的存储设备,并向计算机提供访问该设备的接口。它提供了访问闪存驱动器中存储的文件和数据的功能,并确保数据在计算机和USB闪存驱动器之间的安全传输。


在大多数情况下,现代操作系统如Windows、Mac OS和Linux都内置了对大多数USB闪存驱动器的通用驱动支持。这意味着当你连接USB闪存驱动器时,操作系统会自动加载适当的驱动程序。但在某些情况下,特定的USB闪存驱动器可能需要额外的驱动程序来实现更高级的功能或兼容性。这些驱动程序通常由USB闪存驱动器的制造商提供,并可以从他们的网站上下载和安装。

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言