广告位联系109626141@qq.com

文本框非空的验证

一、设置ID和激活的事件   

 请输入查询条件<asp:TextBox ID="QueryTxt" runat="server" CssClass="wenbenkuang"></asp:TextBox>

            <asp:Button ID="Button1" runat="server" Text="查询" OnClientClick="return checknull()"   OnClick="Button1_Click" CssClass="anniu" />

二、JS代码

 <script language="javascript" type="text/javascript">

        function checknull() {

            var title = document.getElementById("<%=QueryTxt.ClientID %>").value;

            if (title == "") {

                alert("查询条件不能为空");

                return false;

            }

        }

    </script>

三、效果图

表格中文字对齐

​在WORD中插入表格,并设置表格中文字水平、垂直对齐。

插入表格后,设置水平和垂直对齐。水平设置较为简单,利用工具按钮即可完成,垂直对齐的设置:右键菜单–表格属性–单元格–垂直对齐方式–居中

使用SQLSERVER分析考试成绩

一、成绩数据表结构

 

二、存储过程

1、标准分计算

USE [chengji]

GO

/****** Object:  StoredProcedure [dbo].[01biaozhunfen]    Script Date: 08/05/2017 15:51:03 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[01biaozhunfen]

AS

DECLARE @yuwena decimal,@yuwenb decimal,@shuxuea decimal,@shuxueb decimal,@yingyua decimal,@yingyub decimal

DECLARE @wulia decimal,@wulib decimal,@huaxuea decimal,@huaxueb decimal,@shengwua decimal,@shengwub decimal

DECLARE @lishia decimal,@lishib decimal,@dilia decimal,@dilib decimal,@pindea decimal,@pindeb decimal

DECLARE @xinxia decimal,@xinxib decimal,@tiyua decimal,@tiyub decimal,@zongfena decimal,@zongfenb decimal

DECLARE @yuwenavg decimal,@shuxueavg decimal,@yingyuavg decimal,@wuliavg decimal,@huaxueavg decimal,@shengwuavg decimal

DECLARE @lishiavg decimal,@diliavg decimal,@pindeavg decimal,@xinxiavg decimal,@tiyuavg decimal,@zongfenavg decimal

 

select @yuwena=Min(yuwen) from (select top 25 percent yuwen from chengji order by yuwen desc) a

select @yuwenb=Min(yuwen) from (select top 60 percent yuwen from chengji order by yuwen desc) a

select @yuwenavg=AVG(yuwen) from chengji 

select @shuxuea=Min(shuxue) from (select top 25 percent shuxue from chengji order by shuxue desc) a

select @shuxueb=Min(shuxue) from (select top 60 percent shuxue from chengji order by shuxue desc) a 

select @shuxueavg=AVG(shuxue) from chengji 

select @yingyua=Min(yingyu) from (select top 25 percent yingyu from chengji order by yingyu desc) a

select @yingyub=Min(yingyu) from (select top 60 percent yingyu from chengji order by yingyu desc) a

select @yingyuavg=AVG(yingyu) from chengji 

select @wulia=Min(wuli) from (select top 25 percent wuli from chengji order by wuli desc) a

select @wulib=Min(wuli) from (select top 60 percent wuli from chengji order by wuli desc) a

select @wuliavg=AVG(wuli) from chengji 

select @huaxuea=Min(huaxue) from (select top 25 percent huaxue from chengji order by huaxue desc) a

select @huaxueb=Min(huaxue) from (select top 60 percent huaxue from chengji order by huaxue desc) a

select @huaxueavg=AVG(huaxue) from chengji 

select @shengwua=Min(shengwu) from (select top 25 percent shengwu from chengji order by shengwu desc) a

select @shengwub=Min(shengwu) from (select top 60 percent shengwu from chengji order by shengwu desc) a

select @shengwuavg=AVG(shengwu) from chengji 

select @lishia=Min(lishi) from (select top 25 percent lishi from chengji order by lishi desc) a

select @lishib=Min(lishi) from (select top 60 percent lishi from chengji order by lishi desc) a

select @lishiavg=AVG(lishi) from chengji 

select @dilia=Min(dili) from (select top 25 percent dili from chengji order by dili desc) a

select @dilib=Min(dili) from (select top 60 percent dili from chengji order by dili desc) a

select @diliavg=AVG(dili) from chengji 

select @pindea=Min(pinde) from (select top 25 percent pinde from chengji order by pinde desc) a

select @pindeb=Min(pinde) from (select top 60 percent pinde from chengji order by pinde desc) a

select @pindeavg=AVG(pinde) from chengji 

select @xinxia=Min(xinxi) from (select top 25 percent xinxi from chengji order by xinxi desc) a

select @xinxib=Min(xinxi) from (select top 60 percent xinxi from chengji order by xinxi desc) a

select @xinxiavg=AVG(xinxi) from chengji 

select @tiyua=Min(tiyu) from (select top 25 percent tiyu from chengji order by tiyu desc) a

select @tiyub=Min(tiyu) from (select top 60 percent tiyu from chengji order by tiyu desc) a

select @tiyuavg=AVG(tiyu) from chengji 

select @zongfena=Min(zongfen) from (select top 25 percent zongfen from chengji order by zongfen desc) a

select @zongfenb=Min(zongfen) from (select top 60 percent zongfen from chengji order by zongfen desc) a

select @zongfenavg=AVG(zongfen) from chengji 

 

select '语文A线分',@yuwena

union all

select '语文B线分', @yuwenb

union all

select '语文平均分', @yuwenavg

union all

select '数学A线分',@shuxuea

union all

select '数学B线分',@shuxueb

union all

select '数学平均分', @shuxueavg

union all

select '英语A线分', @yingyua

union all

select '英语B线分',@yingyub

union all

select '英语平均分', @yingyuavg

union all

select '物理A线分', @wulia

union all

select '物理B线分', @wulib

union all

select '物理平均分', @wuliavg

union all

select '化学A线分', @huaxuea

union all

select '化学B线分', @huaxueb

union all

select '化学平均分', @huaxueavg

union all

select '生物A线分', @shengwua

union all

select '生物B线分', @shengwub

union all

select '生物平均分', @shengwuavg

union all

select '历史A线分', @lishia

union all

select '历史B线分', @lishib

union all

select '历史平均分', @lishiavg

union all

select '地理A线分', @dilia

union all

select '地理B线分', @dilib

union all

select '地理平均分', @diliavg

union all

select '品德A线分', @pindea

union all

select '品德B线分', @pindeb

union all

select '品德平均分', @pindeavg

union all

select '信息A线分', @xinxia

union all

select '信息B线分', @xinxib

union all

select '信息平均分', @xinxiavg

union all

select '体育A线分', @tiyua

union all

select '体育B线分', @tiyub

union all

select '体育平均分', @tiyuavg

union all

select '总分A线分', @zongfena

union all

select '总分B线分', @zongfenb

union all

select '总分平均分', @zongfenavg

 

2、班级分析

 

USE [chengji]

GO

/****** Object:  StoredProcedure [dbo].[02fenxibanji]    Script Date: 08/05/2017 15:51:33 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[02fenxibanji]

AS

DECLARE @yuwena decimal,@yuwenb decimal,@shuxuea decimal,@shuxueb decimal,@yingyua decimal,@yingyub decimal

DECLARE @wulia decimal,@wulib decimal,@huaxuea decimal,@huaxueb decimal,@shengwua decimal,@shengwub decimal

DECLARE @lishia decimal,@lishib decimal,@dilia decimal,@dilib decimal,@pindea decimal,@pindeb decimal

DECLARE @xinxia decimal,@xinxib decimal,@tiyua decimal,@tiyub decimal,@zongfena decimal,@zongfenb decimal

 

select @yuwena=Min(yuwen) from (select top 25 percent yuwen from chengji order by yuwen desc) a

select @yuwenb=Min(yuwen) from (select top 60 percent yuwen from chengji order by yuwen desc) a

select @shuxuea=Min(shuxue) from (select top 25 percent shuxue from chengji order by shuxue desc) a

select @shuxueb=Min(shuxue) from (select top 60 percent shuxue from chengji order by shuxue desc) a 

select @yingyua=Min(yingyu) from (select top 25 percent yingyu from chengji order by yingyu desc) a

select @yingyub=Min(yingyu) from (select top 60 percent yingyu from chengji order by yingyu desc) a

select @wulia=Min(wuli) from (select top 25 percent wuli from chengji order by wuli desc) a

select @wulib=Min(wuli) from (select top 60 percent wuli from chengji order by wuli desc) a

select @huaxuea=Min(huaxue) from (select top 25 percent huaxue from chengji order by huaxue desc) a

select @huaxueb=Min(huaxue) from (select top 60 percent huaxue from chengji order by huaxue desc) a

select @shengwua=Min(shengwu) from (select top 25 percent shengwu from chengji order by shengwu desc) a

select @shengwub=Min(shengwu) from (select top 60 percent shengwu from chengji order by shengwu desc) a

select @lishia=Min(lishi) from (select top 25 percent lishi from chengji order by lishi desc) a

select @lishib=Min(lishi) from (select top 60 percent lishi from chengji order by lishi desc) a

select @dilia=Min(dili) from (select top 25 percent dili from chengji order by dili desc) a

select @dilib=Min(dili) from (select top 60 percent dili from chengji order by dili desc) a

select @pindea=Min(pinde) from (select top 25 percent pinde from chengji order by pinde desc) a

select @pindeb=Min(pinde) from (select top 60 percent pinde from chengji order by pinde desc) a

select @xinxia=Min(xinxi) from (select top 25 percent xinxi from chengji order by xinxi desc) a

select @xinxib=Min(xinxi) from (select top 60 percent xinxi from chengji order by xinxi desc) a

select @tiyua=Min(tiyu) from (select top 25 percent tiyu from chengji order by tiyu desc) a

select @tiyub=Min(tiyu) from (select top 60 percent tiyu from chengji order by tiyu desc) a

select @zongfena=Min(zongfen) from (select top 25 percent zongfen from chengji order by zongfen desc) a

select @zongfenb=Min(zongfen) from (select top 60 percent zongfen from chengji order by zongfen desc) a

 

SELECT xuexiao as 学校,banji as 班级, '语文A线' as 项目, ROUND(cast(SUM(case when yuwen>=@yuwena then 1 end) as float)/count(*)*100,2) as A线率,'语文B线' as 项目, ROUND(cast(SUM(case when yuwen>=@yuwenb then 1 end) as float)/count(*)*100,2) as B线率,'语文平均分' as 项目,CAST(AVG(yuwen) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao as 学校,banji as 班级, '数学A线' as 项目, ROUND(cast(SUM(case when shuxue>=@shuxuea then 1 end) as float)/count(*)*100,2) as A线率,'数学B线' as 项目, ROUND(cast(SUM(case when shuxue>=@shuxueb then 1 end) as float)/count(*)*100,2) as B线率,'数学平均分' as 项目,CAST(AVG(shuxue) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao as 学校,banji as 班级, '英语A线' as 项目, ROUND(cast(SUM(case when yingyu>=@yingyua then 1 end) as float)/count(*)*100,2) as A线率,'英语B线' as 项目, ROUND(cast(SUM(case when yingyu>=@yingyub then 1 end) as float)/count(*)*100,2) as B线率,'英语平均分' as 项目,CAST(AVG(yingyu) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao as 学校,banji as 班级, '物理A线' as 项目, ROUND(cast(SUM(case when wuli>=@wulia then 1 end) as float)/count(*)*100,2) as A线率,'物理B线' as 项目, ROUND(cast(SUM(case when wuli>=@wulib then 1 end) as float)/count(*)*100,2) as B线率,'物理平均分' as 项目,CAST(AVG(wuli) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao as 学校,banji as 班级, '化学A线' as 项目, ROUND(cast(SUM(case when huaxue>=@huaxuea then 1 end) as float)/count(*)*100,2) as A线率,'化学B线' as 项目, ROUND(cast(SUM(case when huaxue>=@huaxueb then 1 end) as float)/count(*)*100,2) as B线率,'化学平均分' as 项目,CAST(AVG(huaxue) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao as 学校,banji as 班级, '生物A线' as 项目, ROUND(cast(SUM(case when shengwu>=@shengwua then 1 end) as float)/count(*)*100,2) as A线率,'生物B线' as 项目, ROUND(cast(SUM(case when shengwu>=@shengwub then 1 end) as float)/count(*)*100,2) as B线率,'生物平均分' as 项目,CAST(AVG(shengwu) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao as 学校,banji as 班级, '历史A线' as 项目, ROUND(cast(SUM(case when lishi>=@lishia then 1 end) as float)/count(*)*100,2) as A线率,'历史B线' as 项目, ROUND(cast(SUM(case when lishi>=@lishib then 1 end) as float)/count(*)*100,2) as B线率,'历史平均分' as 项目,CAST(AVG(lishi) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao,banji, '地理A线' as 项目, ROUND(cast(SUM(case when dili>=@dilia then 1 end) as float)/count(*)*100,2) as A线率,'地理B线' as 项目, ROUND(cast(SUM(case when dili>=@dilib then 1 end) as float)/count(*)*100,2) as B线率,'地理平均分' as 项目,CAST(AVG(dili) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

 

SELECT xuexiao,banji, '总分A线' as 项目, ROUND(cast(SUM(case when zongfen>=@zongfena then 1 end) as float)/count(*)*100,2) as A线率,'总分B线' as 项目, ROUND(cast(SUM(case when zongfen>=@zongfenb then 1 end) as float)/count(*)*100,2) as B线率,'总分平均分' as 项目,CAST(AVG(zongfen) as DECIMAL(5,2)) as 平均 FROM chengji Group By xuexiao,banji order by xuexiao,banji

3、学校分析

USE [chengji]

GO

/****** Object:  StoredProcedure [dbo].[03fenxixuexiao]    Script Date: 08/05/2017 15:52:48 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

ALTER PROCEDURE [dbo].[03fenxixuexiao]

AS

DECLARE @yuwena decimal,@yuwenb decimal,@shuxuea decimal,@shuxueb decimal,@yingyua decimal,@yingyub decimal

DECLARE @wulia decimal,@wulib decimal,@huaxuea decimal,@huaxueb decimal,@shengwua decimal,@shengwub decimal

DECLARE @lishia decimal,@lishib decimal,@dilia decimal,@dilib decimal,@pindea decimal,@pindeb decimal

DECLARE @xinxia decimal,@xinxib decimal,@tiyua decimal,@tiyub decimal,@zongfena decimal,@zongfenb decimal

 

select @yuwena=Min(yuwen) from (select top 25 percent yuwen from chengji order by yuwen desc) a

select @yuwenb=Min(yuwen) from (select top 60 percent yuwen from chengji order by yuwen desc) a

select @shuxuea=Min(shuxue) from (select top 25 percent shuxue from chengji order by shuxue desc) a

select @shuxueb=Min(shuxue) from (select top 60 percent shuxue from chengji order by shuxue desc) a 

select @yingyua=Min(yingyu) from (select top 25 percent yingyu from chengji order by yingyu desc) a

select @yingyub=Min(yingyu) from (select top 60 percent yingyu from chengji order by yingyu desc) a

select @wulia=Min(wuli) from (select top 25 percent wuli from chengji order by wuli desc) a

select @wulib=Min(wuli) from (select top 60 percent wuli from chengji order by wuli desc) a

select @huaxuea=Min(huaxue) from (select top 25 percent huaxue from chengji order by huaxue desc) a

select @huaxueb=Min(huaxue) from (select top 60 percent huaxue from chengji order by huaxue desc) a

select @shengwua=Min(shengwu) from (select top 25 percent shengwu from chengji order by shengwu desc) a

select @shengwub=Min(shengwu) from (select top 60 percent shengwu from chengji order by shengwu desc) a

select @lishia=Min(lishi) from (select top 25 percent lishi from chengji order by lishi desc) a

select @lishib=Min(lishi) from (select top 60 percent lishi from chengji order by lishi desc) a

select @dilia=Min(dili) from (select top 25 percent dili from chengji order by dili desc) a

select @dilib=Min(dili) from (select top 60 percent dili from chengji order by dili desc) a

select @pindea=Min(pinde) from (select top 25 percent pinde from chengji order by pinde desc) a

select @pindeb=Min(pinde) from (select top 60 percent pinde from chengji order by pinde desc) a

select @xinxia=Min(xinxi) from (select top 25 percent xinxi from chengji order by xinxi desc) a

select @xinxib=Min(xinxi) from (select top 60 percent xinxi from chengji order by xinxi desc) a

select @tiyua=Min(tiyu) from (select top 25 percent tiyu from chengji order by tiyu desc) a

select @tiyub=Min(tiyu) from (select top 60 percent tiyu from chengji order by tiyu desc) a

select @zongfena=Min(zongfen) from (select top 25 percent zongfen from chengji order by zongfen desc) a

select @zongfenb=Min(zongfen) from (select top 60 percent zongfen from chengji order by zongfen desc) a

 

SELECT xuexiao, '语文A线', ROUND(cast(SUM(case when yuwen>=@yuwena then 1 end) as float)/count(*)*100,2),'语文B线', ROUND(cast(SUM(case when yuwen>=@yuwenb then 1 end) as float)/count(*)*100,2) ,'语文平均分',CAST(AVG(yuwen) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '数学A线', ROUND(cast(SUM(case when shuxue>=@shuxuea then 1 end) as float)/count(*)*100,2),'数学B线', ROUND(cast(SUM(case when shuxue>=@shuxueb then 1 end) as float)/count(*)*100,2),'数学平均分',CAST(AVG(shuxue) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '英语A线', ROUND(cast(SUM(case when yingyu>=@yingyua then 1 end) as float)/count(*)*100,2),'英语B线', ROUND(cast(SUM(case when yingyu>=@yingyub then 1 end) as float)/count(*)*100,2),'英语平均分',CAST(AVG(yingyu) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '物理A线', ROUND(cast(SUM(case when wuli>=@wulia then 1 end) as float)/count(*)*100,2),'物理B线', ROUND(cast(SUM(case when wuli>=@wulib then 1 end) as float)/count(*)*100,2),'物理平均分',CAST(AVG(wuli) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '化学A线', ROUND(cast(SUM(case when huaxue>=@huaxuea then 1 end) as float)/count(*)*100,2),'化学B线', ROUND(cast(SUM(case when huaxue>=@huaxueb then 1 end) as float)/count(*)*100,2),'化学平均分',CAST(AVG(huaxue) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '生物A线', ROUND(cast(SUM(case when shengwu>=@shengwua then 1 end) as float)/count(*)*100,2),'生物B线', ROUND(cast(SUM(case when shengwu>=@shengwub then 1 end) as float)/count(*)*100,2),'生物平均分',CAST(AVG(shengwu) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '历史A线', ROUND(cast(SUM(case when lishi>=@lishia then 1 end) as float)/count(*)*100,2),'历史B线', ROUND(cast(SUM(case when lishi>=@lishib then 1 end) as float)/count(*)*100,2),'历史平均分',CAST(AVG(lishi) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '地理A线', ROUND(cast(SUM(case when dili>=@dilia then 1 end) as float)/count(*)*100,2),'地理B线', ROUND(cast(SUM(case when dili>=@dilib then 1 end) as float)/count(*)*100,2),'地理平均分',CAST(AVG(dili) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

SELECT xuexiao, '总分A线', ROUND(cast(SUM(case when zongfen>=@zongfena then 1 end) as float)/count(*)*100,2),'总分B线', ROUND(cast(SUM(case when zongfen>=@zongfenb then 1 end) as float)/count(*)*100,2),'总分平均分',CAST(AVG(zongfen) as DECIMAL(5,2)) FROM chengji Group By xuexiao order by xuexiao

4、班级分析汇总

USE [chengji]

GO

/****** Object:  StoredProcedure [dbo].[全县各班级分析]    Script Date: 08/05/2017 15:53:12 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

 

ALTER PROCEDURE [dbo].[全县各班级分析]

 

AS

BEGIN

SET NOCOUNT ON;

   create table #aa

   (

   学校 nvarchar(20),

   班级 nvarchar(10),

   项目一 nvarchar(10),

   A线率  decimal(5,2),

   项目二 nvarchar(10),

   B线率 decimal(5,2),

   项目三 nvarchar(10),

   平均分 decimal(5,2)

   )

insert into #aa(学校,班级,项目一,A线率,项目二,B线率,项目三,平均分) exec [dbo].[02fenxibanji]

select * from #aa

END

5、学校分析汇总

USE [chengji]

GO

/****** Object:  StoredProcedure [dbo].[全县各学校分析]    Script Date: 08/05/2017 15:53:37 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

 

ALTER PROCEDURE [dbo].[全县各学校分析] 

AS

BEGIN

SET NOCOUNT ON;

 

   SET NOCOUNT ON;

   create table #aa

   (

   学校 nvarchar(20),

   项目一 nvarchar(10),

   A线率  decimal(5,2),

   项目二 nvarchar(10),

   B线率 decimal(5,2),

   项目三 nvarchar(10),

   平均分 decimal(5,2)

   )

insert into #aa(学校,项目一,A线率,项目二,B线率,项目三,平均分) exec [dbo].[03fenxixuexiao]

select * from #aa

END

6、存储过程

注册时异步检测是否存在

在注册时,输入某个关键字,可以异步检测是否存在,从而决定下一步的注册流程。

一、导入JS库

    <script src="JS/jquery.min.js" type="text/javascript"></script>

二、JS脚本

   <script type="text/javascript">
        $(document).ready(function () {
            $("#ryidtxt").val("").focus();
        });

        function checkUserName() {
            var uname = $("#ryidtxt").val();
            if (uname == "") { alert("请输入用户名"); return; }
            $.post('ashx/CheckUserHandler.ashx', { 'ryidtxt': uname }, function (data) {
                if (data == 1) {
                    $("#remind").html("<font color=green>用户名可用</font>");
                }
                else {
                    $("#remind").html("<font color=red>已经存在!</font>"); $("#UserNameTxt").focus();
                    $("#ryidtxt").focus();
                }
            });
        }
    </script>

三、事件

  身份证号码<asp:TextBox ID="ryidtxt" runat="server" onblur="checkUserName();"></asp:TextBox><span
            id="remind"></span><br />

四、后台处理

<%@ WebHandler Language="C#" Class="CheckUserHandler" %>

using System;
using System.Web;


public class CheckUserHandler : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        
        string ryid = context.Request[“ryidtxt”];  //与前面一致
        int result = checkuser(ryid);
        context.Response.ContentType = "text/plain";
        context.Response.Write(result);
        
    }

    public int checkuser(string ryid)
    {
        Model.grjbxx user = new DAL.grjbxx().GetSingle(ryid); //根据传过来的参数获取一条记录
        
        //判断是否存在
        if (user==null) { return 1; }
        return 0;
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}

asp.net显示日期间隔天数和分支显示

 <td>

                        <%# Math.Round((Convert.ToDateTime(Eval("jssj"))- Convert.ToDateTime(Eval("kssj"))).TotalDays,1) %>

                    </td>

                    <td>

                        <%#Eval("ksfzrsh").toString() == "1" ? "<span style='color:green'>通过</span>" : "<span style='color:red'>拒绝</span>"%>

                    </td>

日期时间选择控件

 <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

显示时间:
   开始时间<asp:TextBox ID="kssjtxt"  class="Wdate" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" runat="server"></asp:TextBox><br />
    结束时间<asp:TextBox ID="jssjtxt" class="Wdate"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss'})" runat="server"></asp:TextBox><br />

只显示日期:

  开始时间<asp:TextBox ID="kaishi" class="Wdate" onClick="WdatePicker()"  runat="server"></asp:TextBox>
 结束时间<asp:TextBox ID="jieshu"  class="Wdate" onClick="WdatePicker()"  runat="server"></asp:TextBox>

基本操作总结

Word基本操作

 

字体:中英文字体、字号、间距

段落:格式刷(双击可以刷多次)

图片:插入(注意工作目录)、大小(锁定纵横比)、版式(四周型、紧密型……)、双击图片设置格式

背景:

查找替换:删除空格、空段

页面设置:页面布局——纸张、边距、方向

页眉页脚:

另存PDF:

 

EXCEL操作:

格式:开始—(合并单元格、插入行列、所有框线)

公式:=开头

函数:sum, average, max, min,if

排序:自定义排序(主要、次要关键字)

筛选:

图表:选择数据,若两部分结合CTRL键,—-插入—-推荐的图表—所有图表—选择图表类型、数据源、选项

分析数据:综合利用筛选、排序、分类汇总等。

 

PPT操作:

文字:获取外部TXT中的文字(最小化窗口—找工作目录—复制相关的文字)

格式相同:格式刷;动画相同:动画刷(动画选项卡)

图片:插入、裁剪

背景:图片、纹理

动画:设置、动画刷

切换:时间、方式

超链接:(通过播放检查是否有超链接)内部、网址、邮件

音频:后台播放、在第几张停止

另存为:MP4, WMV, PDF

 

Flash操作:

显示比例:如果画面较大调整到显示全部

图层:顺序、新建

文字:文字工具A,字体,大小、颜色、改变文字方向

声音:插入、数据流同步

元件:编辑、导入

补间动画:动作、形状:至少需要2个关键帧,检查两个关键帧是否存在对象—-创建补间动画有箭头回车测试效果

延续动画:插入帧

引导线:对齐两端、关键帧

遮罩层:

导出影片:SWF

 

PS操作:

图层:新建、删除、调整顺序、不透明度、

图片的合并:拖动

文字:横排、竖排

另存为:JPG(注意文件类型的选择)

抠图:魔棒(注意容差的设置、选择—取消选择)、磁性套索

大小的调整:编辑—自由变换(Ctrl+T)

蒙板:渐变工具的使用

网络基础知识

1、Internet共享打印机的使用协议是IPP。

2、检验Internet打印服务是否安装正确的方法是输入http://127.0.0.1/printers。

3、使用Internet共享打印流程:

(1)在终端输入打印设备的URL

(2)通过Internet把http请求发送到打印服务器

(3)客户端向打印服务器发送身份验证信息。

(4)服务器向用户显示打印机的状态信息

(5)打印服务器生成一个cabinet文件,下载到客户端

(6)用户把要打印的文件发送到打印服务器。

4、采用以太信道或端口聚合技术增加带宽,也起到了负载均衡和冗余备份的作用。

netstat命令

-a:显示所有活动连接,以及正在监听的TCP和UDP端口。

-e:显示以太网统计信息。

-n:显示活动的TCP连接,地址和端口号以数字形式表示。

-o:显示活动的TCP连接以及每个连接对应的进程ID。

-p protocol:用标识符Protocol指定要显示的协议。

-s:显示每个协议的统计数据。

-r:显示IP路由表的内容。其作用相当与route print

 

定时关机命令

如果你的机器正在进行一项长时间运行工作,需要在某个时间关机,我们可以通过输入命令实现定时关机,达到节约用电,绿色环保的目的。

 

开始—运行—输入命令即可。

 

如:17:55关机,可以输入

 

at 17:55 shutdown -s

 

如果想每天都定时关机,那就需要结合定时任务管理了。