Warning: realpath(): open_basedir restriction in effect. File(/www/wwwroot) is not within the allowed path(s): (/www/wwwroot/dlgcy_com/:/tmp/) in /www/wwwroot/dlgcy_com/wp-content/plugins/wp-file-manager/classes/backup-storage.php on line 119

Warning: realpath(): open_basedir restriction in effect. File(/www) is not within the allowed path(s): (/www/wwwroot/dlgcy_com/:/tmp/) in /www/wwwroot/dlgcy_com/wp-content/plugins/wp-file-manager/classes/backup-storage.php on line 119

Warning: realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/www/wwwroot/dlgcy_com/:/tmp/) in /www/wwwroot/dlgcy_com/wp-content/plugins/wp-file-manager/classes/backup-storage.php on line 119
独立观察员作者主页 - 独立观察员 - 第 15 页

『笔记分享』GridView 自定义分页

『笔记分享』GridView 自定义分页

——独立观察员 2016.01.19

参加工作也有一段时间了,如果要找出在学习方面,参加工作后与在学校时的区别的话,那就是,工作后(从实习开始),我无师自通地就开始使用云笔记产品摘录各种知识和遇到的问题,积累了很多,也从中受益匪浅。当然,这一切如此自然而然地发生了,还要感谢我使用的这款云笔记产品——”麦库记事”,在此隆重推荐。我觉得”麦库记事”是最适合程序员使用的一款”云笔记”,我尤其喜欢它的代码高亮功能,以及直接粘贴图片的功能,当然,它还有其它比如收藏微信文章、粘贴Word内容等强大功能,真是令人爱不释手,甚至对于其偶尔的服务不畅都能容忍了。

好了,免费打了这么久广告,还是言归正传吧,当然,如果”麦库记事”的人员看到了请来付下广告费哈。说到我积累了好多笔记,然后我又这么爱分享,所以决定今后时不时地就分享些笔记。这次分享的呢,就如标题所示,是关于ASP.NET中的GridView的分页问题的,接下来就进入正题了。

先来看看效果(可能混合了其它样式):

%title插图%num

1、前台 GridView 中:

<PagerTemplate>
    <div class="pager">
        <div class="pagerLittleBlock">
            <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" Text="First" />
            <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" Text="Previous" />
        </div>
        <div class="pagerLittleBlock">
            <asp:Label runat="server" Text="Page" />
            <asp:Label ID="LabelCurrentPage" runat="server" Text="<%# ((GridView) Container.NamingContainer).PageIndex + 1 %>" />
            <asp:Label runat="server" Text="of" />
            <asp:Label ID="LabelPageCount" runat="server" Text="<%# ((GridView) Container.NamingContainer).PageCount %>" />
        </div>
        <div class="pagerLittleBlock">
            <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" Text="Next" />
            <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page" Text="Last" />
        </div>
        <div class="pagerLittleBlock">
            <asp:Label runat="server" Text="Turn To Page:" />
            <asp:TextBox ID="txtNewPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' />
            <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-2" CommandName="Page" Text="GO" />
        </div>
 
        <%--PageSize需要后台配合--%>
        <asp:DropDownList ID="ddlPageCount" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlPageCount_OnSelectedIndexChanged" Text="<%# ((GridView) Container.NamingContainer).PageSize %>" CssClass="pageSizeLabel">
            <asp:ListItem>10</asp:ListItem>
            <asp:ListItem>15</asp:ListItem>
            <asp:ListItem>20</asp:ListItem>
            <asp:ListItem>30</asp:ListItem>
            <asp:ListItem>50</asp:ListItem>
        </asp:DropDownList>
        <asp:Label runat="server" Text="Page size:" CssClass="pageSizeLabel" />
 
        <div class="pageSizeLabel">(Total <%# ((System.Data.DataTable)((GridView) Container.NamingContainer).DataSource).Rows.Count %> Items)</div>
    </div>
</PagerTemplate>

 

单击 CommandName 属性设置为”Page”的按钮控件时,GridView 控件会执行分页操作。按钮的 CommandArgument 属性确定要执行的分页操作的类型。”Next”导航至下一页,”Prev”导航至上一页, “First”导航至第一页, “Last”导航至最后一页,整数值导航至指定页码。(参考:《GridView >PagerTemplate> 页码》)

 

2、后台:

#region 翻页事件;
 
public delegate void BindGridViewDelegate();
protected void GridView_PageIndexChanging(object sender, GridViewPageEventArgs e, BindGridViewDelegate bindGridView)
{
    GridView theGrid = sender as GridView;
    int newPageIndex = 0;
 
    if (e.NewPageIndex == -3) //点击了Go按钮; "-3"是按钮的CommandArgument-1;
    {           
        TextBox txtNewPageIndex = null;
 
        GridViewRow pagerRow = theGrid.BottomPagerRow;
        if (pagerRow != null)
        {                  
            txtNewPageIndex = pagerRow.FindControl("txtNewPageIndex") as TextBox;
        }
        if (txtNewPageIndex != null)
        {
            newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; //得到索引
        }
    }
    else //点击了其他的按钮
    {              
        newPageIndex = e.NewPageIndex;
    }
    //防止新索引溢出
    newPageIndex = newPageIndex < 0 ? 0 : newPageIndex;
    newPageIndex = newPageIndex >= theGrid.PageCount ? theGrid.PageCount - 1 : newPageIndex;
    //得到新的值
    theGrid.PageIndex = newPageIndex;
 
    //重新绑定数据;使用了委托;
    bindGridView();
}
 
protected void gvMonthProductivity_OnPageIndexChanging(object sender, GridViewPageEventArgs e)
{
    GridView_PageIndexChanging(sender, e, gvMonthProductivityBind);
}
 
protected void ddlPageCount_OnSelectedIndexChanged(object sender, EventArgs e)
{
    gvMonthProductivity.PageSize = int.Parse((sender as DropDownList).SelectedValue.ToString());
    gvMonthProductivityBind();
}
 
#endregion

 

其中,后两个方法中需要按实际修改,也就是注意替换绑定数据的方法,以及GridView对象。

 

3、CSS参考:

/* GridView 翻页区 */

.pager

{

font-size:15px;

margin-top:2px;

margin-bottom:4px;

}

.pager a:link{ color:#000}

.pager a:hover{ color:#000}

.pager a:active{ color:#000}

.pager a:visited{ color:#000}



.pagerLittleBlock {

float: left;

margin-left: 10px;

}

.pagerLittleBlock a {

display: inline-block;

margin-right: 4px;

margin-left: 4px;

}

.pagerLittleBlock input {

width: 30px;

text-align: center;

}



.pageSizeLabel {

float: right;

margin-right: 10px;

}

 

参考:《GridView自定义分页》

使用Git Extensions简单入门Git

使用Git Extensions简单入门Git

——独立观察员 2015.11.25

前言

关于这个主题,之前我录了段视频教程,在本地看清晰度还可以,但传到优酷上就很不清晰了,即使是后来重制后还是一样不清晰,所以现在想整理成文字版。当然,大家还可以将我百度云上的视频下载下来观看,连同优酷的相关地址都附在文末了。

 

正文

说到Git呢,相信从事软件开发的都不陌生,是用于版本控制的,在全球范围内被广泛使用,相比于另一版本控制技术——SVN,似乎更受追捧一些,全球最大的代码托管平台GitHub使用的就是Git技术。

Git与SVN的最主要的区别就是,Git的代码仓库是分布式的,一般流程就是在本地拉一个服务器上仓库的拷贝,修改代码后先提交到本地仓库,然后再合并到远程仓库;而SVN的代码仓库是集中式的,一般就服务器上的一个,提交代码就是直接提交到服务器上的仓库去,这样如果网络不畅就无法提交了,那段时间就无法版本控制了。

还有一点比较明显的区别,不过我不知道我说的对不对,大家听且听之,自行判断。Git由于有本地仓库,工作目录一般就在本地仓库那里,从文件角度上看不出两个分支的文件分别在哪里,似乎工作目录下同时只存在一个分支。而SVN则能够清晰地看到哪些是主干的文件,哪些是分支的文件。

长久以来,Git都是以命令行方式使用的,而SVN在Windows上则有TortoiseSVN这样的强大的图形界面工具,这就形成了鲜明对比。对于刚入门的人,就会不由自主地偏爱上使用TortoiseSVN来使用SVN,而对Git心生敬畏。其实SVN也是可以使用命令行来使用的,而Git近年来也有了图形界面工具,包括TortoiseGit、msysGit(Git版本控制系统在Windows下的版本)的Gui、以及本文将要介绍的Git Extensions等。

我刚开始得知Git Extensions时,它是作为一款Visual Studio插件映入我眼帘的,在Visual Studio的插件库中可以下载,但好像好久没更新了(版本为2.47.03)。后来(录完视频教程之后)我才发现原来其代码维护在sourceforge网站(版本为2.48.05)。

 

一、现在我们来安装这个新版本(略去不重要的内容)

 

以下界面所示的三个工具,如果没安装过,则勾上让其安装。MsysGit为Git的Windows版本,必须要安装;Kdiff为对比/合并工具,可选安装,可以换为使用其它的相关工具;最后一个Windows Credential Store for Git用于在Windows Credential Manager中存储仓库的密码,这在老版本中没有,也安上吧。

%title插图%num

 

安装Git Extensions:

%title插图%num

 

安装KDiff3:

%title插图%num

 

安装Git:

%title插图%num

 

将Git和一些Unix工具加入运行路径中:

%title插图%num

 

跨平台项目不推荐选第三个,Windows上推荐选第一个,所以就选第一个吧:

%title插图%num

 

安装完成,Git Extensions会弹出配置界面,如果有问题,一般就是选择一下相关组件的路径即可:

%title插图%num

 

SSH客户端,OpenSSH是命令行的,PuTTY是图形界面的:

%title插图%num

 

二、接下来以使用Git@OSC网站为例

 

随便选个项目点击进入:

%title插图%num

 

点击Fork,即可克隆代码到自己的空间当中:

%title插图%num

 

然后在自己的空间即可查看:

%title插图%num

 

一般自己创建一个新分支:

%title插图%num

 

保留原有的master分支不去使用:

%title插图%num

 

因为点击那个双箭头的圈会强制从fork的源拉取代码来覆盖原有的分支:

%title插图%num

 

可以更改默认分支、设置是否使用SVN来管理等:

%title插图%num

 

配置分支保护,可将原有分支设为只读,避免自己提交代码时不小心弄混了:

%title插图%num

 

复制代码路径:

%title插图%num

 

在文件夹内右键,选择“GitExt Clone…“:

%title插图%num

 

粘贴url,然后分支我们先选master的,点击克隆:

%title插图%num

 

然后可用Pull选项拉取代码到本地仓库:

%title插图%num

 

View changes选项可查看修改记录:

%title插图%num

 

可以看到此时本地的master与远程(origin)是同步的:

%title插图%num

 

使用”Git Bash Here”选项可打开一个专用的命令行窗口(Bash):

%title插图%num

 

可直接以命令行方式使用(比如查看当前是哪个分支):

%title插图%num

 

使用Checkout branch…功能可签出分支,这里我们将远程的dlgcy分支也迁出到本地:

%title插图%num

 

这样本地就和远程一样也有两个分支了:

%title插图%num

 

使用命令行也可看出:

%title插图%num

 

使用”GitExt Commit…”选项可提交修改:

%title插图%num

左上角区域放的是改动过的文件,点击紫色向下的箭头可载入单个文件或全部载入,载入到底下的提交区,右上角显示选中文件的改动内容,右下角填写改动信息,最后点击提交或提交并推送即可。

 

使用Push…选项可将本地仓库推送到远程仓库:

%title插图%num

 

会要求输入(你在oschina网站的)用户名和密码:

%title插图%num

 

切换分支就会切换代码,就有可能就会有不同了:

%title插图%num

 

切成了dlgcy分支:

%title插图%num

 

使用命令行提交更改:

%title插图%num

 

使用命令行推送更改:

%title插图%num

(由于之前将master分支设置为了只读,所以当时推送不成功;这次推送到dlgcy分支则是成功的。)

 

然后我们到网站上看一下,可以看到刚才的提交记录了:

%title插图%num

 

此时查看本地的差异是这样的:

%title插图%num

(因为本地master有修改和提交但未推送成功,本地dlgcy有修改和提交且推送成功)

 

附录

优酷地址:http://v.youku.com/v_show/id_XMTM2ODk0ODM2OA

百度云地址:http://pan.baidu.com/s/1kTzlC71

优酷去除广告方法

优酷去除广告方法

——独立观察员 2015.11.16

 

之前在猎豹浏览器上使用Chrome插件”广告终结者”,能够比较好地去除视频前面的超长广告,后来失效了。在“百度经验”看到一个方法,试用了能够去除广告,但也有副作用——清晰度、是否连播等设置无法保存,导致每开一个视频就要设置一下,也是不胜其烦的。

本文提供的方法是在“经验”的方法的基础上加以改进,既能去除广告,又能保存设置项。

 

1、在host文件中屏蔽相关IP:

打开host文件(在 C:\Windows\System32\drivers\etc 下),添加以下内容:

#优酷
127.0.0.1 atm.youku.com
127.0.0.1 Fvid.atm.youku.com
127.0.0.1 html.atm.youku.com
127.0.0.1 valb.atm.youku.com
127.0.0.1 valf.atm.youku.com
127.0.0.1 valo.atm.youku.com
127.0.0.1 valp.atm.youku.com
127.0.0.1 lstat.youku.com
127.0.0.1 speed.lstat.youku.com
127.0.0.1 urchin.lstat.youku.com
127.0.0.1 stat.youku.com
127.0.0.1 static.lstat.youku.com
127.0.0.1 valc.atm.youku.com
127.0.0.1 vid.atm.youku.com
127.0.0.1 walp.atm.youku.com

保存后,右键将该文件改为只读的。

 

2、找到static.youku.com文件夹:

Windows 7及以上系统 —— C:\\用户\#你的用户名#\AppData\Roaming\Macromedia\Flash Player\#SharedObjects;

Windows XP —— C:\\Documents and setting\#你的用户名#\ApplicationData\Macromedia\Flash Player\#SharedObjects\DXGB5Y7G。

(static.youku.com文件夹在上面提到的位置可能会随机变化)

 

3、进行设置:

删除 static.youku.com 文件夹中的文件(这步操作过后应该就已经没有广告了),然后对该文件夹修改用户的访问权限(属性–>安全),仅保留自己的账户,然后勾选”写入权限”,取消勾选”修改”权限:

%title插图%num

 

(“百度经验”的方法是将文件夹改为没有后缀的文本文件,这个方法我们就不用了)

 

后记:本方法后半部分是本人亲自摸索出来的,亲测有效(Win10企业版、猎豹浏览器)!但是,不保证一直有效,尤其是本文发出后,所以一开始我是拒绝写这篇文章的。现在发出以飨读者,大家低调一点即可。

 

百度云盘批量离线下载思想

百度云盘批量离线下载思想

——独立观察员 2015.10.07

最近在网上获得了一份电影资源下载地址列表( 中国老电影合集15(香港邵氏经典电影) ),想要保存下来。全部下载呢,一来网速没那么快,二来也不一定全都看,这么多下载下来也不合适。理想的情况是有人提供网盘的共享链接,那么我们直接转存就好了,可惜没有。百度云盘还有个方便的功能,就是离线下载功能,直接使用BT种子或者磁力链接就可以下载到自己的网盘里。然而,百度云的离线下载磁力链接功能并不支持批量下载,一次只能下载一条,对于需要大量下载的情况,还是比较费时费力的。

那么能不能批量下载呢?答案自然是肯定的,如下。

参考:百度云网盘批量离线下载 – 开源中国社区

/*
谷歌浏览器打开 http://pan.baidu.com/disk/home#from=share_pan_logo 页面 --> 点击"离线下载" --> 点击"新建链接任务" --> CTRL+Shift+J 打开console,将以下代码粘贴到末尾然后按回车运行。
*/

links=[
"ed2k://|file|1969.飞刀手(ED2000.COM).rmvb|562539658|0EB8D7FC689A729B7126D4EECEEDF30E|h=ES5MJNHBS7SL4EJX2QH24QKBYK3VBUN5",
"ed2k://|file|1969.保镖(ED2000.COM).rmvb|541020288|35CEBD9E16354A23A1860EBF73674469|h=32CI3IBPOJYIOO3N3TLNVYELZBJ5YA4Y"]

links.forEach(function(v,i,a){
    $('#share-offline-link').val(v);
    $('#_disk_id_28').click();
})

关键就是”CTRL+Shift+J 打开console,将代码粘贴到末尾然后按回车运行“这一招我之前并不知道,原来这样可以自己用JS控制页面。其中links数组存储了想要下载的链接;forEach方法并不是JS的标准方法,而是在Chrome等浏览器中支持而已,其回调函数的三个参数为(element, index, array)。

链接填写框的id为”#share-offline-link“:

%title插图%num

确定按钮的id为”#_disk_id_28“:

%title插图%num

所以函数的功能就是对每个链接,将其填写到输入框中,然后模拟点击确定按钮。

对于链接数据格式(添加引号和逗号)的准备,我们可以使用”符号包裹“软件来辅助进行:

%title插图%num

然后将准备好的数据和代码粘贴到Console窗口中,点击回车键执行:

%title插图%num

如果成功就会显示出下载历史:

%title插图%num

直接显示下载成功的一般就是能够”极速秒传”的,也就是服务器上已经有该文件,已经转存到你的网盘了。其它一些状态一直是0%的,一般就很难下载好了,还是早日投奔迅雷会员怀抱吧。

当然,现实总是残酷的——下载多了就需要验证码:

%title插图%num

经测试,发现一段时间(未知)内,最多只能批量下载15条,之后每一条都需要输入验证码。对此,我们可用”换账号”法、”改日再下”法、以及其它未知方法来解决。

还有种错误是”普通用户每月只能离线5个任务”,我其它帐号也不是会员呀,不知道它们是怎么算的:

%title插图%num

总之,使用这个方法进行批量离线下载,能够在一定程度上减轻重复劳动,但并不完美。不过,重要的是其中的思想,所以,本文标题中并未使用”方法”,而是使用了”思想”,希望大家多多讨论。

『日记』20150818凌晨

『日记』20150818凌晨

——独立观察员

睡梦中隐隐约约听到一句清晰的女声:”说好我们一起洗衣服的,你又磨叽到这么晚才回来。衣服已经好几天没洗了,我都没衣服穿了……哈哈……”  其中男生的声音听不清楚,之后就是女生穿着拖鞋远去的声音。

其间,本来大脑已经准备将其处理为梦境了,但还是不由自主地醒来(好像在梦境与现实的分界线挣扎了一小会儿),同时自身受到5000点伤害。

躺了一小会,还是战胜不了好奇心,启动手机,然后看了下时间,是3:28,所以之前应该是凌晨3点十几分,确实是够晚的。

然后我翻了个身,继续睡觉。

 

希望各位看官解析,调侃也行,但请有理有据,自圆其说。

『毕设程序简介』学生办事预约平台

『毕设程序简介』学生办事预约平台

——独立观察员 2015.06.21

 

二零一五年六月十七日,本人毕业了。

当然,之前是完成了毕业设计,写好了毕业论文了的。本人的毕业设计可能并不怎么样,不过完全原创,纯手工打造,饱含了心血。所以,不吐不快。

 

本文摘选自本人的论文第7章”案例演示”,以一个”领取新教材”的预约过程为例,展示系统的完整流程,如下。

1、负责人创建服务项

假定此处的负责人为图书馆的一位相关管理员”11052411″,其以管理员身份登录系统:

%title插图%num

登录后来到首页,此时选择”添加服务项”来添加”领取新教材”服务:

%title插图%num

在添加服务项页面,填写好服务项的信息后,点击”创建服务”即可:

%title插图%num

 

2、学生预约服务

此处有位学生”11054126″以学生身份登录系统,他在首页可看到”查看可预约的服务项”功能:

%title插图%num

点进页面后,其可找到”领取新教材”服务项,可点击其上的”详情”按钮进入后续步骤:

%title插图%num

进入详情页面后,点击”预约”展开右侧的预约区域,选择日期、时间段后,系统会判断该时间段是否可预约,若有预约名额,则可点击”确定”进行预约:

%title插图%num

 

3、负责人审批预约

负责人”11052411″再次登录系统时,在首页可看到有新消息:

%title插图%num

在消息页面,显示有人预约了”领取新教材”服务:

%title插图%num

其可直接点击”预约记录”进入预约详情页面,并在其中进行审批:

%title插图%num

 

4、学生打印和评价

学生”11054126″在首页收到了审批的消息,其可进入消息页面中查看,也可以使用”查看历史预约记录”功能进行类似操作:

%title插图%num

在”我的所有预约记录”中,可点击”领取新教材”预约记录条目左边的”详情/打印/评价”按钮进入预约详情页面:

%title插图%num

在预约详情页面,其可进行预约记录的打印和评价:

%title插图%num

学生凭打印单,在线下按预约时间去领取教材。完成后再回来评价,学生完成评价则本次预约流程结束。

 

后记:本文只是个引子,有兴趣的朋友可通过如下渠道获得详细信息。

源码下载——http://download.csdn.net/detail/w19921004/8826513

源码跟踪——https://git.oschina.net/dlgcy/StudentAppointmentPlatform

论文全文——http://wenku.baidu.com/view/dfbd7d4d8bd63186bdebbc04 或 http://pan.baidu.com/s/1bnxynfh

使用TortoiseSVN将某个SVN目录下的目录指向另一个仓库

使用TortoiseSVN将某个SVN目录下的目录指向另一个仓库

——独立观察员 2015.04.09

哈哈,不知道大家有没有这种需求,是不是看到标题感到有点蛋疼呢?无论如何,我今天想要实现这个操作,发现还不是那么容易的呢。可能使用原生SVN或者使用命令行可以比较容易达到这个效果吧(不知道,也可能不行),不过虽然我是个程序员,但坦白说我并不喜欢命令行。所以,我就寻求直接使用TortoiseSVN的图形化操作来达成的方法。没想到还真成了,不敢独享,分享如下。

先来看看TortoiseSVN的机制:

%title插图%num

也就是一个SVN主目录(指定了一个仓库了的)下有个”.svn”目录,用于存储一些信息。在主目录内的空白处右键,可看到TortoiseSVN的菜单,在”导出”下面有个”重新定位”的选项,这就是用于重新指定数据仓库的指令,当然,这是用于切换整个SVN目录的仓库的。

可以看到,切换还是挺方便的:

%title插图%num

 

那么,在子目录下能不能同样地操作呢?我们来试试,进入子目录,然后右键展开菜单:

%title插图%num

可以看到,此处不再出现”重新定位”选项了,也就是说不能如前面那样操作了。

 

那么怎么办呢?其实也很简单。既然”.svn”是存储相关信息的,那么我们不让它读到相关信息不就好了嘛。

具体方法有移动目录或改名等,移来移去太麻烦了,我们来改名吧 —— 在”.svn”的最前面添加一些字符:

%title插图%num

 

此时无论在此目录或子目录内右键,都可发现相关菜单项减少了很多:

%title插图%num

也就是TortoiseSVN不认为这是个SVN目录了。

 

这样,我们就可以在子目录中右键–>”SVN检出”,然后在弹出窗口中就可以任意选择SVN仓库地址进行检出了:

%title插图%num

其实我本次是想将放在新浪SAE的SVN目录中的一些内容传到开源中国的Git@OSC代码托管仓库中,所以我先选择的是”导入”操作:

%title插图%num

 

反正经过一番操作之后,该子目录被认可为SVN目录了:

%title插图%num

 

现在来恢复外层目录为原来的SVN目录,只需将相关文件夹改回原来的”.svn”名字即可。不过,在Windows下还有些不同,直接将前面添加的字符删去,会提示”必须键入文件名”,就跟开始时如果只在最后添加字符是一样的错误:

%title插图%num

 

可参考《教你如何在Windows平台上创建以点(.)开头的文件名》。此处只需在删除前面的字符时同时在最后加个点即可,最后的点系统会自动忽略:

%title插图%num

 

好了,现在为了看看两个库是不是都能用,我们在相关子目录中添加个文件:

%title插图%num

 

然后分别在”这个目录内空白处”和”上层目录空白处”右键–>”SVN提交”:

%title插图%num

可见是都能提交的。

 

这样我们就能更加灵活地使用SVN了,祝大家使用愉快!

已安装好的系统(MBR常规启动)如何改成UEFI启动?

已安装好的系统(MBR常规启动)如何改成UEFI启动?

——独立观察员 2015.04.06

先看看网上是怎么说的:

已安装好的win81(MBR常规启动)如何改成UEFI启动?-UEFI-远景论坛-微软极客社区

yaojy:

……步骤如下:

1、压缩硬盘最后那个分区,做出100MB的自由空间。右击桌面”这台电脑”→管理→磁盘管理,在后面那个分区右击选”压缩卷”:

%title插图%num

如图,腾出100MB大小的空间:

%title插图%num

2、然后右击刚才整出来的自由空间,选新建,创建一个新分区,然后格式化为FAT32或FAT16。完成后自动分配盘符,记得盘符字母,假设是k。

3、生成EFI启动文件。运行命令:bcdboot c:\windows /s k: /f UEFI /l zh-CN

 

现在我来说几句:

(上述前两项操作可用”分区助手”完成,第三步建议使用管理员版的命令提示符进行;可打开该新盘看看是否有复制成功内容。)

然后在BIOS的Boot菜单下进行UEFI设置(如果没有相关选项,说明主板不支持):

%title插图%num

将 UEFI Boot 设为 Enabled(启用):

 %title插图%num

然后在启动项优先级中将第一项设为”Windows Boot Manager“:

 %title插图%num

最后保存BIOS设置后重启系统即可。

 

后记:很多人都说最好以UEFI方式重装,不然会有问题。果然,我的就出了一点问题(Windows 10 Build 10041)——点击关机只是注销的效果而关不了机。加上我之前就是把系统安在SSD硬盘上,开机已经很快了,启用这个UEFI后开机速度并没有明显提升,所以最终我还是切换回BIOS方式启动了(还是要注意一下启动位置的设置)。

分享ASP.NET固定GridView表头的方法

分享ASP.NET固定GridView表头的方法

——独立观察员 2015.03.27

最近接到一个任务,是需要将ASP.NET页面中的GridView的表头固定住,不随滚动条滚动,只是表身滚动。其实要实现得很完美,对我来说还是很难的,因为我对JS不熟练,虽然也自学过很多次,但总感觉一直入不了门,就像Android一样。还是C#给人一种平易近人的感觉,很好上手。

老大倒是给我指了条思路,说可以自己用html写表头,然后将GridView自身的表头隐藏就好了。我觉得这个听上去容易,真正做起来应该不简单吧。完全搞不定啊,还是问问度娘吧。

 

在网上看到有人推荐这个:

%title插图%num

用了一下,确实可以,也没有”ScrollableGridPlugin.js方法“的表头与表身错位的问题。

但问题还是有的,就是表格中文字都未换行,后来找到了原因:

%title插图%num(原先是 “nowarp”)

 

附——”white-space”介绍:

white-space属性设置如何处理元素内的空白。所有浏览器都支持 white-space 属性。

可能的值

值

描述

normal

默认。空白会被浏览器忽略。

pre

空白会被浏览器保留。其行为方式类似 HTML 中的 <pre> 标签。

nowrap

文本不会换行,文本会在在同一行上继续,直到遇到 <br> 标签为止。

pre-wrap

保留空白符序列,但是正常地进行换行。

pre-line

合并空白符序列,但是保留换行符。

inherit

规定应该从父元素继承 white-space 属性的值。

(值 pre-wrap 和 pre-line 是 CSS 2.1 中新增的。)

 

言归正传,还有的问题就是浏览器窗口缩小后右边比较难看,且底部滑动条形同虚设,滑动后并不能展现到右边的表格内容:

%title插图%num

(尝试解决但未成功,请大家不吝赐教)

 

接下来先说说任务方面的处理:

由于菜单以下是iframe页面:

%title插图%num

 

所以可通过设置这个iframe引用的页面的高度,使得iframe页向上滚动到顶时刚好到合适的位置:

%title插图%num

 

这里主要就是设置这个表格的高度,这就要牵涉到本次固定表头方法的用法了。

 

之前提到的网页可下载2个JS文件和1个CSS文件(我用了Chrome插件”Quick Source Viewer”方便下载)。其中superTables.js 存放主要方法,jquery.superTable.js 存放快捷调用方法,superTables.css 则是样式了,三者都遵循MIT授权,是很宽松的一种Lisence。

 

调用方法(完整用法可看源代码):

%title插图%num

使用Jquery选取GridView,用width和height设置宽和高,fixedCols参数设置前几列固定,colWidths可指定各列的宽度,还有其它一些参数,比如有个可设置几行作为表头的(即固定前几行)。

 

有些人可能喜欢先在线看看代码再决定使不使用,我就满足他们吧:

1、jquery.superTable.js

/////////////////////////////////////////////////////////////////////////////////////////
// Super Tables Plugin for jQuery - MIT Style License
// Copyright (c) 2009 Jeffrey Lee --- blog.darkthread.net
//
// A wrapper for Matt Murphy's Super Tables http://www.matts411.com/post/super_tables/
//
// Contributors:
//
/////////////////////////////////////////////////////////////////////////////////////////
////// TO CALL: 
// $("...").toSuperTable(options)
//
////// OPTIONS: (order does not matter )
// cssSkin : string ( eg. "sDefault", "sSky", "sOrange", "sDark" )
// headerRows : integer ( default is 1 )
// fixedCols : integer ( default is 0 )
// colWidths : integer array ( use -1 for auto sizing )
// onStart : function ( any this.variableNameHere variables you create here can be used later ( eg. onFinish function ) )
// onFinish : function ( all this.variableNameHere variables created in this script can be used in this function )
// margin, padding, width, height, overflow...: Styles for "fakeContainer"
//
////// Example:
// $("#GridView1").toSuperTable(
//              { width: "640px", height: "480px", fixedCols: 2,
//                onFinish: function() { alert('Done!'); } })

(function($) {
    $.fn.extend(
            {
                toSuperTable: function(options) {
                    var setting = $.extend(
                    {
                        width: "640px", height: "320px",
                        margin: "10px", padding: "0px",
                        overflow: "hidden", colWidths: undefined,
                        fixedCols: 0, headerRows: 1,
                        onStart: function() { },
                        onFinish: function() { },
                        cssSkin: "sSky"
                    }, options);
                    return this.each(function() {
                        var q = $(this);
                        var id = q.attr("id");
                        q.removeAttr("style").wrap("<div id='" + id + "_box'></div>");

                        var nonCssProps = ["fixedCols", "headerRows", "onStart", "onFinish", "cssSkin", "colWidths"];
                        var container = $("#" + id + "_box");

                        for (var p in setting) {
                            if ($.inArray(p, nonCssProps) == -1) {
                                container.css(p, setting[p]);
                                delete setting[p];
                            }
                        }
                        
                        var mySt = new superTable(id, setting);

                    });
                }
            });
})(jQuery);

 

2、superTables.js

/////////////////////////////////////////////////////////////////////////////////////////
// Super Tables v0.30 - MIT Style License
// Copyright (c) 2008 Matt Murphy --- www.matts411.com
//
// Contributors:
// Joe Gallo
/////////////////////////////////////////////////////////////////////////////////////////
////// TO CALL: 
// new superTable([string] tableId, [object] options);
//
////// OPTIONS: (order does not matter )
// cssSkin : string ( eg. "sDefault", "sSky", "sOrange", "sDark" )
// headerRows : integer ( default is 1 )
// fixedCols : integer ( default is 0 )
// colWidths : integer array ( use -1 for auto sizing )
// onStart : function ( any this.variableNameHere variables you create here can be used later ( eg. onFinish function ) )
// onFinish : function ( all this.variableNameHere variables created in this script can be used in this function )
//
////// EXAMPLES:
// var myST = new superTable("myTableId");
//
// var myST = new superTable("myTableId", {
//		cssSkin : "sDefault",
//		headerRows : 1,
//		fixedCols : 2,
//		colWidths : [100, 230, 220, -1, 120, -1, -1, 120],
//		onStart : function () {
//			this.start = new Date();
//		},
//		onFinish : function () {
//			alert("Finished... " + ((new Date()) - this.start) + "ms.");
//		}
// });
//
////// ISSUES / NOTES:
// 1. No quirksmode support (officially, but still should work)
// 2. Element id's may be duplicated when fixedCols > 0, causing getElementById() issues
// 3. Safari will render the header row incorrectly if the fixed header row count is 1 and there is a colspan > 1 in one 
//		or more of the cells (fix available)
/////////////////////////////////////////////////////////////////////////////////////////

var superTable = function (tableId, options) {
/////* Initialize */
	options = options || {};
	this.cssSkin = options.cssSkin || "";
	this.headerRows = parseInt(options.headerRows || "1");
	this.fixedCols = parseInt(options.fixedCols || "0");
	this.colWidths = options.colWidths || [];
	this.initFunc = options.onStart || null;
	this.callbackFunc = options.onFinish || null;
	this.initFunc && this.initFunc();
	
/////* Create the framework dom */
	this.sBase = document.createElement("DIV");
	this.sFHeader = this.sBase.cloneNode(false);
	this.sHeader = this.sBase.cloneNode(false);
	this.sHeaderInner = this.sBase.cloneNode(false);
	this.sFData = this.sBase.cloneNode(false);
	this.sFDataInner = this.sBase.cloneNode(false);
	this.sData = this.sBase.cloneNode(false);
	this.sColGroup = document.createElement("COLGROUP");
	
	this.sDataTable = document.getElementById(tableId);
	this.sDataTable.style.margin = "0px"; /* Otherwise looks bad */
	if (this.cssSkin !== "") {
		this.sDataTable.className += " " + this.cssSkin;
	}
	if (this.sDataTable.getElementsByTagName("COLGROUP").length > 0) {
		this.sDataTable.removeChild(this.sDataTable.getElementsByTagName("COLGROUP")[0]); /* Making our own */
	}
	this.sParent = this.sDataTable.parentNode;
	this.sParentHeight = this.sParent.offsetHeight;
	this.sParentWidth = this.sParent.offsetWidth;
	
/////* Attach the required classNames */
	this.sBase.className = "sBase";
	this.sFHeader.className = "sFHeader";
	this.sHeader.className = "sHeader";
	this.sHeaderInner.className = "sHeaderInner";
	this.sFData.className = "sFData";
	this.sFDataInner.className = "sFDataInner";
	this.sData.className = "sData";
	
/////* Clone parts of the data table for the new header table */
	var alpha, beta, touched, clean, cleanRow, i, j, k, m, n, p;
	this.sHeaderTable = this.sDataTable.cloneNode(false);
	if (this.sDataTable.tHead) {
		alpha = this.sDataTable.tHead;
		this.sHeaderTable.appendChild(alpha.cloneNode(false));
		beta = this.sHeaderTable.tHead;
	} else {
		alpha = this.sDataTable.tBodies[0];
		this.sHeaderTable.appendChild(alpha.cloneNode(false));
		beta = this.sHeaderTable.tBodies[0];
	}
	alpha = alpha.rows;
	for (i=0; i<this.headerRows; i++) {
		beta.appendChild(alpha[i].cloneNode(true));
	}
	this.sHeaderInner.appendChild(this.sHeaderTable);
	
	if (this.fixedCols > 0) {
		this.sFHeaderTable = this.sHeaderTable.cloneNode(true);
		this.sFHeader.appendChild(this.sFHeaderTable);
		this.sFDataTable = this.sDataTable.cloneNode(true);
		this.sFDataInner.appendChild(this.sFDataTable);
	}
	
/////* Set up the colGroup */
	alpha = this.sDataTable.tBodies[0].rows;
	for (i=0, j=alpha.length; i<j; i++) {
		clean = true;
		for (k=0, m=alpha[i].cells.length; k<m; k++) {
			if (alpha[i].cells[k].colSpan !== 1 || alpha[i].cells[k].rowSpan !== 1) {
				i += alpha[i].cells[k].rowSpan - 1;
				clean = false;
				break;
			}
		}
		if (clean === true) break; /* A row with no cells of colSpan > 1 || rowSpan > 1 has been found */
	}
	cleanRow = (clean === true) ? i : 0; /* Use this row index to calculate the column widths */
	for (i=0, j=alpha[cleanRow].cells.length; i<j; i++) {
		if (i === this.colWidths.length || this.colWidths[i] === -1) {
			this.colWidths[i] = alpha[cleanRow].cells[i].offsetWidth;
		}
	}
	for (i=0, j=this.colWidths.length; i<j; i++) {
		this.sColGroup.appendChild(document.createElement("COL"));
		this.sColGroup.lastChild.setAttribute("width", this.colWidths[i]);
	}
	this.sDataTable.insertBefore(this.sColGroup.cloneNode(true), this.sDataTable.firstChild);
	this.sHeaderTable.insertBefore(this.sColGroup.cloneNode(true), this.sHeaderTable.firstChild);
	if (this.fixedCols > 0) {
		this.sFDataTable.insertBefore(this.sColGroup.cloneNode(true), this.sFDataTable.firstChild);
		this.sFHeaderTable.insertBefore(this.sColGroup.cloneNode(true), this.sFHeaderTable.firstChild);
	}
	
/////* Style the tables individually if applicable */
	if (this.cssSkin !== "") {
		this.sDataTable.className += " " + this.cssSkin + "-Main";
		this.sHeaderTable.className += " " + this.cssSkin + "-Headers";
		if (this.fixedCols > 0) {
			this.sFDataTable.className += " " + this.cssSkin + "-Fixed";
			this.sFHeaderTable.className += " " + this.cssSkin + "-FixedHeaders";
		}
	}
	
/////* Throw everything into sBase */
	if (this.fixedCols > 0) {
		this.sBase.appendChild(this.sFHeader);
	}
	this.sHeader.appendChild(this.sHeaderInner);
	this.sBase.appendChild(this.sHeader);
	if (this.fixedCols > 0) {
		this.sFData.appendChild(this.sFDataInner);
		this.sBase.appendChild(this.sFData);
	}
	this.sBase.appendChild(this.sData);
	this.sParent.insertBefore(this.sBase, this.sDataTable);
	this.sData.appendChild(this.sDataTable);
	
/////* Align the tables */
	var sDataStyles, sDataTableStyles;
	this.sHeaderHeight = this.sDataTable.tBodies[0].rows[(this.sDataTable.tHead) ? 0 : this.headerRows].offsetTop;
	sDataTableStyles = "margin-top: " + (this.sHeaderHeight * -1) + "px;";
	sDataStyles = "margin-top: " + this.sHeaderHeight + "px;";
	sDataStyles += "height: " + (this.sParentHeight - this.sHeaderHeight) + "px;";
	if (this.fixedCols > 0) {		
		/* A collapsed table's cell's offsetLeft is calculated differently (w/ or w/out border included) across broswers - adjust: */
		this.sFHeaderWidth = this.sDataTable.tBodies[0].rows[cleanRow].cells[this.fixedCols].offsetLeft;
		if (window.getComputedStyle) {
			alpha = document.defaultView;
			beta = this.sDataTable.tBodies[0].rows[0].cells[0];
			if (navigator.taintEnabled) { /* If not Safari */
				this.sFHeaderWidth += Math.ceil(parseInt(alpha.getComputedStyle(beta, null).getPropertyValue("border-right-width")) / 2);
			} else {
				this.sFHeaderWidth += parseInt(alpha.getComputedStyle(beta, null).getPropertyValue("border-right-width"));
			}
		} else if (/*@cc_on!@*/0) { /* Internet Explorer */
			alpha = this.sDataTable.tBodies[0].rows[0].cells[0];
			beta = [alpha.currentStyle["borderRightWidth"], alpha.currentStyle["borderLeftWidth"]];
			if(/px/i.test(beta[0]) && /px/i.test(beta[1])) {
				beta = [parseInt(beta[0]), parseInt(beta[1])].sort();
				this.sFHeaderWidth += Math.ceil(parseInt(beta[1]) / 2);
			}
		}
		
		/* Opera 9.5 issue - a sizeable data table may cause the document scrollbars to appear without this: */
		if (window.opera) {
			this.sFData.style.height = this.sParentHeight + "px";
		}
		
		this.sFHeader.style.width = this.sFHeaderWidth + "px";
		sDataTableStyles += "margin-left: " + (this.sFHeaderWidth * -1) + "px;";
		sDataStyles += "margin-left: " + this.sFHeaderWidth + "px;";
		sDataStyles += "width: " + (this.sParentWidth - this.sFHeaderWidth) + "px;";	    
	} else {
		sDataStyles += "width: " + this.sParentWidth + "px;";
	}
	this.sData.style.cssText = sDataStyles;
	this.sDataTable.style.cssText = sDataTableStyles;
	
/////* Set up table scrolling and IE's onunload event for garbage collection */
	(function (st) {
		if (st.fixedCols > 0) {
			st.sData.onscroll = function () {
				st.sHeaderInner.style.right = st.sData.scrollLeft + "px";
				st.sFDataInner.style.top = (st.sData.scrollTop * -1) + "px";
			};
		} else {
			st.sData.onscroll = function () {
				st.sHeaderInner.style.right = st.sData.scrollLeft + "px";
			};
		}
		if (/*@cc_on!@*/0) { /* Internet Explorer */
			window.attachEvent("onunload", function () {
				st.sData.onscroll = null;
				st = null;
			});
		}
	})(this);
	
	this.callbackFunc && this.callbackFunc();
};

 

3、superTables.css

/*
///////////////////////////////////////////////////////////////////////////////////////// 
// Super Tables v0.30 - MIT Style License
// Copyright (c) 2008 Matt Murphy --- www.matts411.com
//
// Contributors:
// Joe Gallo
///////////////////////////////////////////////////////////////////////////////////////// 
*/
.sBase {
	position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* HEADERS */
.sHeader {
	position: absolute;
	z-index: 3;
	background-color: #ffffff;
}
.sHeaderInner {
	position: relative;
}
.sHeaderInner table {
	border-spacing: 0px 0px !important;
	border-collapse: collapse !important;
	width: 1px !important;
	table-layout: fixed !important;
	background-color: #ffffff; /* Here b/c of Opera 9.25 :( */
}

/* HEADERS - FIXED */
.sFHeader {
	position: absolute;
	z-index: 4;
	overflow: hidden;
}
.sFHeader table {
	border-spacing: 0px 0px !important;
	border-collapse: collapse !important;
	width: 1px !important;
	table-layout: fixed !important;
	background-color: #ffffff; /* Here b/c of Opera 9.25 :( */
}

/* BODY */
.sData {
	position: absolute;
	z-index: 2;
	overflow: auto;
	background-color: #ffffff;    
}
.sData table {
	border-spacing: 0px 0px !important;
	border-collapse: collapse !important;
	width: 1px !important;
	table-layout: fixed !important;
}

/* BODY - FIXED */
.sFData {
	position: absolute;
	z-index: 1;
	background-color: #ffffff;
}
.sFDataInner {
	position: relative;
}
.sFData table {
	border-spacing: 0px 0px !important;
	border-collapse: collapse !important;
	width: 1px !important;	
	table-layout: fixed !important;
}


/*
///////////////////////////////////////////////////////////////////////////////////////// 
// Super Tables - Skin Classes
// Remove if not needed
///////////////////////////////////////////////////////////////////////////////////////// 
*/

/* sDefault */
.sDefault {
	margin: 0px;
	padding: 0px;
	border: none;
	font-family: Verdana, Arial, sans serif;
	font-size: 0.8em;
}
.sDefault th, .sDefault td {
	border: 1px solid #cccccc;
	padding: 3px 6px 3px 4px;
	white-space: nowrap;
}
.sDefault th {
	background-color: #e5e5e5;
	border-color: #c5c5c5;
}
.sDefault-Fixed {
	background-color: #eeeeee;
	border-color: #c5c5c5;
}

/* sSky */
.sSky {
	margin: 0px;
	padding: 0px;
	border: none;
	font-family: Verdana, Arial, sans serif;
	font-size: 0.8em;
}
.sSky th, .sSky td {
	border: 1px solid #9eb6ce;
	padding: 3px 6px 3px 4px;
	white-space: normal; /*单元格自动换行*/
}
.sSky th {
	background-color: #CFDCEE;
}
.sSky-Fixed {
	background-color: #e4ecf7;
}

/* sOrange */
.sOrange {
	margin: 0px;
	padding: 0px;
	border: none;
	font-family: Verdana, Arial, sans serif;
	font-size: 0.8em;
}
.sOrange th, .sOrange td {
	border: 1px solid #cebb9e;
	padding: 3px 6px 3px 4px;
	white-space: nowrap;
}
.sOrange th {
	background-color: #ECD8C7;
}
.sOrange-Fixed {
	background-color: #f7ede4;
}

/* sDark */
.sDark {
	margin: 0px;
	padding: 0px;
	border: none;
	font-family: Verdana, Arial, sans serif;
	font-size: 0.8em;
	color: #ffffff;
}
.sDark th, .sDark td {
	border: 1px solid #555555;
	padding: 3px 6px 3px 4px;
	white-space: nowrap;
}
.sDark th {
	background-color: #000000;
}
.sDark-Fixed {
	background-color: #222222;
}
.sDark-Main {
	background-color: #333333;
}
.altRow {
    background-color: #ddddff;
}

 

4、调用方法参考

<script type="text/javascript">

    $(document).ready(function () {

        $(function () { /*固定表头*/

            $("#gvPMOSuggestShow").toSuperTable({

                width: "1210px",

                height: "730px",

                fixedCols: 3,

                colWidths: [30, 50, 80, 70, 60, 50, 110, 300, 250, 100, 50, 40]

            }).find("tr:even").addClass("altRow");

        });

    });

</script>

 

最后奉上文件地址:

http://download.csdn.net/detail/w19921004/8539125

 

『外文翻译』基于数据库的在线订房系统

(唉,最近江郎才尽了,好久都没发博文了,来一篇凑个数吧)

(这是我毕业设计开题阶段的外文翻译其中一篇)

(这篇外文感觉比较老了,不过条理比较清晰,而且我觉得我翻译得不错,哈哈)

 

译文一

基于数据库的在线订房系统

 

关键词:在线订房系统;数据库;网站设计;电子商务

 

摘要

随着网络技术的快速发展,因特网和电子商务技术被不断地使用,计算机应用在服务业的应用范围不断扩大,在线订房系统也愈发成熟。在本论文中,基于对当前在线订房系统现状的分析,进行具体设计和系统实现在线订房系统。

 

引言

在线订房系统是一个典型的数据库应用开发,它实际上是基于商家和顾客模式的电子商务系统,并且近些年正愈发成熟。通过这个模式,快速、方便和人性化得以在商家和顾客的相互作用中实现,这不仅大大提高旅馆的工作效率,还满足了顾客通过网络足不出户进行预订客房、会议和宴会的需求。

 

1. 现状分析

近年来,在线订房产业增长迅速。与传统的电话预订系统比较,在线订房系统避免了传统人工服务带来的出错和不便,变得更快速、方便和有效率,因此具有广阔的前景。[1]对原因和优势的详细分析如下:

 

1.1 原因分析

a.因特网的快速发展

因特网的广泛分布和快速发展为在线订房系统提供了广阔的平台,系统支持和顾客资源。21世纪以来,因特网在全世界广受欢迎,世界进入了信息时代;网络预约成为了人们日常生活中不可或缺的一部分。[2]提高旅馆的入住率和周转率将需要处理大量的数据和信息,这就需要通过客房预订系统存储和分析大量的信息,以便实现信息管理和快速查询。

b.持续改善的生活水平

随着我们经济的持续发展,人们的收入稳步增长,生活水平和质量大大提高,人们的消费水平也得到了很大的提升。在”黄金周”假日和休息日,旅游已经成为许多人放松休闲的主要选择。商业、旅游、度假以及其它活动为中国的旅店业的发展带来了新的机遇。

 

1.2 优势分析

a. 减少花销。因为所有的交易都能够实时在线,且是自动的,同时顾客还能立即确认订单和在线查询结果,这就节省了很多通讯费用,比如长途电话和传真的确认,也减少了旅馆在员工、时间和人力资源上的负担。[3]同时,旅馆通过网络平台能够获得更多的销售渠道和客户基础,这就可以节省高额的广告和宣传花销。

b. 提升信誉。通过在线预约,旅馆可以提供实时的订购确认,方便的查询和最新的动态信息服务,顾客对旅馆的满意度和忠诚度都会提升。此外,在线预订能够享受更优惠的价格和便利性,可为会员开通短信通知服务,会员订购成功则会直接收到一条提醒的短消息,这就提升了顾客对旅馆的好感和信任。

 

2.方案设计

2.1 设计目标

系统设计需要实现旅馆客房预订管理、顾客信息管理的目标,使用ASP来进行前台的开发,实现数据的增、删、查和其它功能,使用SQL Server作为后台数据库。

 

2.2 设计要求

(1)显示旅馆的所有方面,客房的配备;

(2)向顾客提供度假胜地的详细信息,周边的著名景点;

(3)实现在线预订服务;

(4)开通顾客的反馈和评价渠道;

(5)通过网站后台管理初始化信息,旅馆客房信息,顾客预约信息,顾客反馈内容;

(6)联合前台预约和后台管理;

(7)系统稳定、安全和可靠地运行。

 

2.3 开发环境

用户可以使用任何终端——个人电脑、笔记本电脑、手机,通过浏览器界面来访问在线预订系统。

(1)网页浏览器:支持Internet Explorer和Netscape;

(2)网站服务器:Internet Information Server;

(3)数据库设计:SQL Server。

 

3. 系统实现

在线订房系统是一种新类型的电子商务模式。根据上面的设计方案,该系统主要可划分为数据库设计、前台展现、后台管理部分。

 

3.1 数据库设计

数据库设计任务就是要在数据库管理系统的支持下设计一个规范化、结构化、方便、有效、灵活的数据库,以旅馆预订应用的要求为依据,并且能够反映真实世界信息的联系,满足数据库应用系统的处理要求。[4]顾客的要求体现了所有种类的信息提供、存储、查询和更新等,因此,数据库结构必须完全满足所有种类信息的输入输出。

 

3.2 前台展现

前台展现可以划分为五个主要的浏览窗口,也就是,旅馆前台页面、介绍、在线预订、周边、联系我们。

(1)旅馆前台页面。这个部分主要包括横幅广告,导航功能分类。新颖和独特的旅馆横幅广告能够使顾客对旅馆更加印象深刻。导航是网站设计不可缺少的基本元素之一,其不仅提供了站点覆盖的分类信息的基础,还为浏览者提供了路标。

(2)旅馆介绍。[5]这部分主要包括旅馆介绍,地理位置,房间服务,会展中心,餐馆食物,商业服务,交通指南等;

(3)在线预订。这是在线订房系统的关键内容,包括在线订购的整个预订系统的固定流程。登记信息必须真实有效;否则预订将会产生不可预期的错误,还需确定到达和离开的时间是否过期;

(4)旅馆周边。主要介绍观光胜地,饮食,购物区,交通信息,以及其它周边信息;

(5)联系我们。这部分主要包括在线消息,在线顾客服务,联系方式,等等。

 

3.3 后台管理区

后台管理区的主要功能是初始化网站信息,前台图片信息管理,客房管理,以及订单管理,反馈管理和信息管理系统[6]。

(1)站点管理:首先是管理页面和退出模块,主要用来退出后台管理系统,以及更改初始化信息,检查服务器信息,等等;

(2)前台图片信息管理:主要包括图片管理,旅馆介绍管理,旅馆周边信息管理,等等;

(3)客房管理:主要包括房间类型,房间服务管理,等等;

(4)订单管理:主要包括订单管理,确认订单管理,响应管理,等等;

(5)反馈管理:主要包括反馈信息,评价信息管理,等等;

(6)系统信息管理:主要用于网站的版权信息管理,技术支持,等等。

 

结论

本论文中的在线订房系统的方案设计是个小型的电子信息管理服务平台,通过这个,能够将更快速方便的服务提供给顾客,也给旅馆提供了更加直观和灵活的宣传渠道。

因特网成为了当今世界最普通、快速的交流工具,在线订房也成为了旅馆预订最流行的方式。通过在线订房系统,顾客能够实现以更低的价格在世界的任何地方在任何时间实时的在线预订。同时,他们还能获得关于周边旅游景点、购物、饮食、活动的信息,这是任何传统订购方式都不能比的。

在线订房系统为旅馆业的发展带来了新的活力和生机。作为一个具有广阔前景的预约系统,在线预约系统,内部基于现代信息技术,将会迅速成为旅馆预订的主要方式。

 

参考文献

[1] Guo Xiang Wang Yutao, Zhao Haiyang. Hotel Management System Design and Application [J]. Small and Medium-sized Enterprise Management and Technology. 2009

[2] Wang Xuan. The Design and Maintenance of the Website [J]. Industrial and Technology BBS. 2010

[3] Song Kun, SQL Server Database Development Instance. Machinery Industry Press. 2006

[4] Gao Zhipeng Chen Qi. Enterprise Website Construction Foundation [M]. Tsinghua University Press. 2004.

[5] Yang Xuanhui. Information System analysis and Design [M]. Tsinghua University Press. 2007

[6] Sa Shixuan, Wang Shan. Introduction to Database System. [M] Higher Education Press. 2002

 

 

外文一

Online Room-booking System Based on Database

 

Keywords: Online room-booking system; Database; Web design; Electronic commerce

 

Abstract. With the rapid development of network technology, the Internet and electronic commerce
technology is unceasingly used, the application scope of computer application in the hospitality industry booming, online room-booking system also increasingly mature. In this paper, based on the analysis of the present situation of online room-booking system, conducts specific design and system implementation of online room-booking system.

 

Introduction

Online room-booking system is a typical database application development, which is actually the e-commerce system based on the pattern of merchants and customers and is in growing and mature in recent years. Through this model, quicker, convenient, human nature is achieved in the business and customer interaction, which not only greatly improve the efficiency of the hotel, but also satisfy the customers’ requirement to reserve guest rooms, conference, and banquet through the network without leaving home.

 

1. Analysis of the situation

In recent years, the online room-booking industry grows rapidly. Compared with the traditional telephone reservation system, online room-booking system avoids the error and disadvantageous factors brought by traditional artificial service, being quick, convenient, and efficient, therefore has a broader prospects. [1]Detailed analysis of the reasons and advantages are as follows:

1.1 Reasons analysis

a. The rapid development of the Internet.

The widespread of the Internet and the rapid development has provided a broad platform, system support and customer source for online room-booking system. Since the 21st century, the Internet has been popular around the world, the world into the information age; network reservation has become an indispensable part of people’s daily life. [2] To improve hotel occupancy rate and turnover rate will have to deal with large amount of data and information, which needs store and analyze large amounts of information through the guest room reservation system, so as to achieve the information management and rapid query.

b. The continuous improvement of living standards.

With the sustained development of our economy, people’s income increase steadily, the level and quality of life greatly improved, and people’s consumption level has also achieved great development. In the “golden week” holidays and rest days, traveling has become the primary choice of many people to relax and leisure. Business, tourism, vacation and other activities has brought the new opportunity for the development of hotel industry in China.

 

1.2 Advantages analysis

 

a. reduce the cos. As all of the transaction can be real-time online, autonomous, customers can also instant confirm order and the query results online, which have saved a lot of communication expenses such as long distance telephone and fax confirmation, also reduced the workload of the hotel staff, time and human resources. [3]At the same time, the hotel can reach more sales channels and customer base through the network platform, which can save the high advertising and publicity cost.

 

b. Improve the credibility. Through online reservation, the hotel can provide real-time booking confirm, convenient query and the latest dynamic information service, customer satisfaction and loyalty to the hotel will increase. In addition, online booking can enjoy more preferential price and convenience, opening SMS alerts service for members, members booking successful will directly receive a short message to remind, thus improve customer favor and trust to the hotel.

 

2. Scheme design

 

2.1 design goals

 

The system design is to realize the goal of hotel guest room booking management, customer information management, taking ASP as development foreground, realize the data to add, delete, query and other functions, and use SQL Server as database in the background.

 

2.2 The design requirements

(1) Exhibit all aspects of the hotel, the guesthouse equipment;

(2) Provide customers with the resort of detailed information, famous scenic spots around;

(3) Realize online booking services;

(4) Open channels of customer feedback and evaluation;

(5) Manage initialization information, hotel guest room information, guest reservation information, guest feedback content through the website backstage;

(6) Unify the front desk of reservation with the backstage management;

(7) System runs stably, safe and reliable.

2.3 development environment

 

Users can access to the online booking system via a browser interface through any client, PC, laptop computers, mobile phones.

 

(1) Web browsers: Support Internet explorer and Netscape;

 

(2) Web Server: Internet Information Server;

 

(3) Database design: SQL Server.

 

3. System implementation

 

Online room-booking system is a new type of e-commerce model. According to the design scheme above, the system is mainly divided into the database design, exhibit at the front desk, backstage management area.

 

3.1 Database design

 

Database design task is to design a standardized, structured, convenient, efficient, flexible database supported by the database management system in accordance with the requirements of the hotel reservation applications, and can reflect the real world information contact, meet the processing requirements of database application system.[4] Customers’ demand embodies of all kinds of information providing, storage, query and update, etc., thus, the database structure must fully meet the input and output of all kinds of information.

 

3.2 The foreground exhibit

 

The foreground exhibit can be divided into five main browsing window, namely, the hotel front page, introduction, online booking, around, contact us.

 

(1) The hotel front page. This part mainly includes the banner ads, the navigation function classification. Novel and unique hotel banner ads can make the customer more impressive to the hotel. Navigation is an indispensable one of the basic elements of website design, which not only provides the foundation for information classification site covers, also provides a roadmap for web surfers.

 

(2) Introduction of the hotel. [5]This part mainly includes the hotel introduction, geographical location, room service, conference and exhibition center, restaurant food, business services, traffic guide and so on;

 

(3) Online booking. This is the key content of online room-booking system, involving the concrete process of the whole reservation system for online booking. The registration information must be real and effective; otherwise reservation can’t be forecast correctly, also to determine whether time of arrival and leave expired;

 

(4) Around the hotel. Mainly introduces tourist attractions, food, shopping areas, traffic information, etc surrounding;

 

(5) Contact us. This part mainly includes the online messages, online customer service, contact information, etc.

 

3.3 The background management areas

 

Main function of the background management areas is to initialize the website information, foreground image information management, guest room management, and order management, feedback management and information management system[6].

 

(1)Site management: the first are the management page and exit module, mainly for the exiting background management system, and change the initial information, check the server information, etc;

 

(2)Foreground image information management: mainly including image management, hotel introduction management, hotel surroundings management, etc.;

 

(3)Guest room management: mainly including the room type, room service management, etc.;

 

(4)Order management: mainly including order management, confirmed order management, response management, order management, etc;

 

(5)Feedback management: mainly including feedback information, evaluation information management, etc.;

(6)System information management: mainly for the management of copyright of this website, technical support, etc.

 

Summary

 

Online room-booking system scheme design in this paper is a small electronic information management service platform, through which, more rapid and convenient services can be provided to customers, as well as a more intuitive and flexible publicity channels foe the hotel.

 

The Internet becomes the most common, rapid communication tools in today’s world, and online room-booking has also become the most popular way of hotel reservation. Through online room-booking system, customers can realize real-time online reservation in lower price for anywhere in the world at any time. At the same time they also can get information about the surrounding tourism, shopping, food, activities, which is incomparable to any kind of traditional way of booking.

 

Online room-booking system has brought new vigor and vitality for hotel industry development. As a reservation system of a broad prospect, online reservation system, based on modern information technology in the will increasingly becomes a mainstream way of hotel reservation.

 

References

[1] Guo Xiang Wang Yutao, Zhao Haiyang. Hotel Management System Design and Application [J]. Small and Medium-sized Enterprise Management and Technology. 2009

[2] Wang Xuan. The Design and Maintenance of the Website [J]. Industrial and Technology BBS. 2010

[3] Song Kun, SQL Server Database Development Instance. Machinery Industry Press. 2006

[4] Gao Zhipeng Chen Qi. Enterprise Website Construction Foundation [M]. Tsinghua University Press. 2004.

[5] Yang Xuanhui. Information System analysis and Design [M]. Tsinghua University Press. 2007

[6] Sa Shixuan, Wang Shan. Introduction to Database System. [M] Higher Education Press. 2002

 

→←