590
社区成员
发帖
与我相关
我的任务
分享
/*================================================================================================*/
/* 网站CSS样式定义 */
/*=================================================================================================*/
/* 网站链接总的css定义:可定义内容为链接字体颜色、样式等 */
a{text-decoration: none;} /* 链接无下划线,有为underline */
a:link {color: #454545;} /* 未访问的链接 */
a:visited {color: #454545;} /* 已访问的链接 */
a:hover{color: #ff0000;} /* 鼠标在链接上 */
a:active {color: #454545;} /* 点击激活链接 */
a.linknav3:link { color: #ffffff; text-decoration:none;}
a.linknav3:visited { color: #ffffff; text-decoration:none;}
a.linknav3:active { color: #ffffff; text-decoration:none;}
a.linknav3:hover { color: #ff0000; text-decoration:none;}
a.3:link { color: #454545; text-decoration:none; font-size: 10pt;}
a.3:visited { color: #454545; text-decoration:none; font-size: 10pt;}
a.3:active { color: #454545; text-decoration:none; font-size: 10pt;}
a.3:hover { color: #ff0000; text-decoration:none; font-size: 10pt;}
/* body的css定义:可定义内容为网页字体颜色、背景、浏览器边框等 */
BODY {
BACKGROUND-POSITION: center 50%; SCROLLBAR-FACE-COLOR: #f2f5f7; FONT-SIZE: 12px; BACKGROUND-ATTACHMENT: fixed; MARGIN: 0px; SCROLLBAR-HIGHLIGHT-COLOR: #b2c3d0; SCROLLBAR-SHADOW-COLOR: #b2c3d0; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #97aaba; SCROLLBAR-TRACK-COLOR: #ffffff; FONT-FAMILY: Tahoma, Verdana; SCROLLBAR-DARKSHADOW-COLOR: #ffffff; BACKGROUND-COLOR: #ffffff
}
TD {
FONT-WEIGHT: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: "宋体"
}
li{
margin:0px;
list-style-type: none;
padding:0px;
}
ul{
margin:0px;
padding:5px;
}
/* 单元格TD的css定义:这里为总的表格定义,为一般表格的的单元格风格设置,可定义内容为背景、字体颜色、样式等 */
.TextBox
{
background-color: #ffffff;
border-bottom: #666666 1px solid;
border-left: #666666 1px solid;
border-right: #666666 1px solid;
border-top: #666666 1px solid;
color: #666666;
height: 18px;
border-color: #666666 #666666 #666666 #666666; font-size: 9pt
}
.ClassNav{
COLOR: #ffffff; LINE-HEIGHT: 150%;font-weight:bold;
padding-left:10px;
}
A.CirTitle:link {
LINE-HEIGHT: 150%;FONT-SIZE: 14px; COLOR: #ffffff; TEXT-DECORATION: none
}
A.CirTitle:visited {
LINE-HEIGHT: 150%;FONT-SIZE: 14px;COLOR: #ffffff; TEXT-DECORATION: none
}
A.CirTitle:hover {
LINE-HEIGHT: 150%;FONT-SIZE: 14px; COLOR: #ff6600; TEXT-DECORATION: underline
}
A.CirTitle:active {
LINE-HEIGHT: 150%;FONT-SIZE: 14px; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
}
.font14{
FONT-SIZE: 14px; BACKGROUND: none transparent scroll repeat 0% 0%; LINE-HEIGHT: 26px; BORDER-BOTTOM: #727272 1px dashed
}
.TopNavi A:active {
COLOR: #ffffff; LINE-HEIGHT: 150%; font-size:12px;TEXT-DECORATION: none
}
.TopNavi A:link {
COLOR: #ffffff; LINE-HEIGHT: 150%; font-size:12px;TEXT-DECORATION: none
}
.TopNavi A:visited {
COLOR: #ffffff; LINE-HEIGHT: 150%; font-size:12px;TEXT-DECORATION: none
}
.TopNavi A:hover {
COLOR: #FF6600; LINE-HEIGHT: 150%; font-size:12px;TEXT-DECORATION: underline
}
.Title
{
background:#009AE8;
color: #ffffff;
font-weight: bold;
background-image:url(manage_top_bg.gif);
}
.tdbg{
background:#EEF8FE;
}
.tdbgmouseover{
background:#ffffff;
}
.border
{
border: 1px solid #449AE8;background:#ffffff;
}
.tppd{
font-weight:bolder
}
.inputButton
{
background-color: #ffffff;
border-bottom: #666666 1px solid;
border-left: #666666 1px solid;
border-right: #666666 1px solid;
border-top: #666666 1px solid;
color: #666666;
height: 18px;
border-color: #666666 #666666 #666666 #666666; font-size: 9pt
}
/* 按钮的css定义:这里为按钮的风格设置,可定义内容为背景、字体、颜色、边框等 */
button
{font-size: 9pt;height: 20px;}
/* 下拉列表框的css定义:这里为下拉列表框的风格设置,可定义内容为背景、字体、颜色、边框等 */
select
{font-size: 9pt;height: 20px;}
.strip{ /*头条*/
font-family: "黑体";
font-weight: bold;
font-size: 24pt;
}
/***********************************网站底部css定义开始************************************/
.Site_bottombg
{
background:url(/Images/Default/bar_Footbg.gif);
height:30 px;
color: #ffffff;
}
a.bottom:link {color: #ffffff;}
a.bottom:visited {color: #ffffff;}
a.bottom:hover{color: #ff0000;}
a.bottom:active {color: #ffffff;}
/***********************************网站底部css定义结束************************************/
/***********************************图片中心css定义开始************************************/
.ImagePlayerArea /*图片内容页图片播放器播放区css定义*/
{border: 1px solid #efefef;
width:760px;
height:420px;
background-color: #FFFFFF;
}
.PlayerImagesList /*图片内容页图片播放器底部缩略图列表区css定义*/
{
width:760px;
height:90px;
color: #000000;
top:10px;
background-color: #EDF0F5;
}
/***********************************图片中心css定义结束*************************************/
/***********************************下中心css定义开始************************************/
.Table_Down_List /*下载终级分页表格css定义*/
{border: 1px solid #efefef;
background-color: #FFFFFF;
}
.Table_Down_List_Title /*下载终级分页 下载名称 css */
{
height:22px;
color: #000000;
border-bottom:1px dashed #cdcdcd;
background-color: #EDF0F5;
}
.Table_Down_List_bottom /*下载终级分页 下载底部 css */
{
height:22px;
color: #000000;
border-top:1px dashed #cdcdcd;
}
/***********************************下载中心css定义结束*************************************
/**********************************评论css定义开始************************************/
.comment_write_table{ /*发表评论整个表格*/
border: 1px solid #A7A7A7;
color: #000000;
top:10px;
background-color: #ffffff;
}
.comment_write_title{ /*发表评论表格Title*/
background:url(/Images/Default/btbg.gif);
color: #000000;
height: 27px;
text-align: center;
font-weight:bolder;
}
.comment_show_table{ /*显示评论*/
border: 1px solid #A7A7A7;
color: #000000;
}
/***********************************评论css定义结束************************************/
/********************************搜索结果页面css定义开始*********************************/
.content {
margin:auto 0 ;
width: 760px;
padding: 10px;
}
.header {
width: 760px;
padding: 5px 0px 5px 0px;
border-bottom: 5px solid #FF0000;
}
.ss /*搜索结果页表格边框css定义*/
{ padding:20px;
border: 1px solid #a7a7a7;
}
.Search_table_title /* 搜索结果页表格标题css定义*/
{
background:url(/Images/Default/btbg.gif);
color: #000000;
text-align: center;
font-weight:bolder;
}
/****************************搜索结果页面css定义结束****************************************/
/********************************总站表格css定义开始*********************************/
.table_border /*表格边框css定义*/
{border: 1px solid #a7a7a7;}
.link_table_title /* 表格标题css定义*/
{background:url(/Images/Default/btbg.gif);
color: #000000;
height:30px;
text-align: center;
font-weight:bold;
background-color: #CCCCCC;
font-size: 16px;
}
/****************************总站表格csscss定义结束****************************************/
<?php
!$_COOKIE && exit('Forbidden');
error_reporting(0);
define('D_P',__FILE__ ? substr(__FILE__,0,-6) : './');
define('R_P',D_P);
$timestamp=time();
$x_size=100;//图片宽度
$y_size=30;//图片高度
require_once(D_P.'data/bbscache/config.php');
$db_cvtime != 0 && $timestamp += $db_cvtime*60;
if($_GET['admin']){
$db_ckpath='/';
$db_ckdomain='';
}
$nmsg = num_rand(4);
Cookie('cknum',StrCode($timestamp."\t\t".md5($nmsg.$timestamp)));
if(function_exists('imagecreate') && function_exists('imagecolorallocate') && function_exists('imagepng') &&
function_exists('p_w_picpathetpixel') && function_exists('imageString') && function_exists('imagedestroy') && function_exists('imagefilledrectangle') && function_exists('imagerectangle')){
$aimg = imagecreate($x_size,$y_size);//建立图像
$back = imagecolorallocate($aimg,mt_rand(220,255),mt_rand(220,255),mt_rand(220,255));//随机背景色
$border = imagecolorallocate($aimg,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));//随机边框颜色
imagefilledrectangle($aimg,0,0,$x_size - 1,$y_size - 1,$back);
imagerectangle($aimg,0,0,$x_size - 1,$y_size - 1,$border);
//改进版本验证码 By FlowerCode
//欢迎访问www.0GiNr.com
/*
////////////////////////
/////主要函数说明///////
////////////////////////
int p_w_picpathetpixel ( resource image, int x, int y, int color)
p_w_picpathetpixel() 在 image 图像中用 color 颜色在 x , y 坐标(图像左上角为 0, 0)上画一个点。
int p_w_picpathtring ( resource image, int font, int x, int y, string s, int col)
p_w_picpathtring() 用 col 颜色将字符串 s 以 font 号字画到 image 所代表的图像的 x ,y 座标处(图像的左上角为 0, 0)。
int imageline ( resource image, int x1, int y1, int x2, int y2, int color)
imageline() 用 color 颜色从坐标 x1 ,y1 到 x2 ,y2 (图像左上角为 0, 0)画一条直线。
int imagerectangle ( resource image, int x1, int y1, int x2, int y2, int col)
imagerectangle() 用 col 颜色在 image 图像中画一个矩形,其左上角坐标为 x1, y1,右下角坐标为 x2, y2。图像的左上角坐标为 0, 0。
int mt_rand ( [int min, int max])
如果没有提供可选参数 min 和 max ,mt_rand() 返回 0 到 RAND_MAX 之间的伪随机数。
例如想要 5 到 15(包括 5 和 15)之间的随机数,用 mt_rand(5, 15)。
*/
for($i=1; $i<=20;$i++){//20是干扰矩形的数量
imagerectangle ($aimg,mt_rand(1,$x_size), mt_rand(1,$y_size), mt_rand(1,$x_size), mt_rand(1,$y_size), imageColorAllocate($aimg,mt_rand(130,255),mt_rand(130,255),mt_rand(130,255)));
}
for($i=1; $i<=100;$i++){//100是干扰像素的数量
$dot = imagecolorallocate($aimg,mt_rand(50,255),mt_rand(50,255),mt_rand(50,255));
p_w_picpathetpixel($aimg,mt_rand(1,$x_size), mt_rand(1,$y_size),$dot);
}
for($i=1; $i<=20;$i++){//20是干扰文本的数量
imageString($aimg,1,$i*$x_size/12+mt_rand(1,$x_size),mt_rand(1,$y_size),jujiUHFjio3r2,imageColorAllocate($aimg,mt_rand(130,255),mt_rand(130,255),mt_rand(130,255)));
}
for($i=1; $i<=50;$i++){//50是干扰文本2的数量
imageString($aimg,1,$i*$x_size/12+mt_rand(1,$x_size),mt_rand(1,$y_size),e,imageColorAllocate($aimg,mt_rand(130,255),mt_rand(130,255),mt_rand(130,255)));
}
for($i=1; $i<=30;$i++){//30是干扰线条的数量
imageline($aimg,mt_rand(1,$x_size),mt_rand(1,$y_size),mt_rand(1,$x_size),mt_rand(1,$y_size),imageColorAllocate($aimg,mt_rand(130,255),mt_rand(130,255),mt_rand(130,255)));
}
for ($i=0;$i<strlen($nmsg);$i++){//验证码
imageString($aimg,mt_rand(5,20),$i*$x_size/4+mt_rand(1,10),mt_rand(1,15),$nmsg[$i],imageColorAllocate($aimg,mt_rand(50,255),mt_rand(0,100),mt_rand(50,255)));
}
header("Pragma:no-cache");
header("Cache-control:no-cache");
header("Content-type: image/png");
imagepng($aimg);
imagedestroy($aimg);
exit;
} else{
header("Pragma:no-cache");
header("Cache-control:no-cache");
header("ContentType: Image/BMP");
$Color[0] = chr(0).chr(0).chr(0);
$Color[1] = chr(255).chr(255).chr(255);
$_Num[0] = "1110000111110111101111011110111101001011110100101111010010111101001011110111101111011110111110000111";
$_Num[1] = "1111011111110001111111110111111111011111111101111111110111111111011111111101111111110111111100000111";
$_Num[2] = "1110000111110111101111011110111111111011111111011111111011111111011111111011111111011110111100000011";
$_Num[3] = "1110000111110111101111011110111111110111111100111111111101111111111011110111101111011110111110000111";
$_Num[4] = "1111101111111110111111110011111110101111110110111111011011111100000011111110111111111011111111000011";
$_Num[5] = "1100000011110111111111011111111101000111110011101111111110111111111011110111101111011110111110000111";
$_Num[6] = "1111000111111011101111011111111101111111110100011111001110111101111011110111101111011110111110000111";
$_Num[7] = "1100000011110111011111011101111111101111111110111111110111111111011111111101111111110111111111011111";
$_Num[8] = "1110000111110111101111011110111101111011111000011111101101111101111011110111101111011110111110000111";
$_Num[9] = "1110001111110111011111011110111101111011110111001111100010111111111011111111101111011101111110001111";
echo chr(66).chr(77).chr(230).chr(4).chr(0).chr(0).chr(0).chr(0).chr(0).chr(0).chr(54).chr(0).chr(0).chr(0).chr(40).chr(0).chr(0).chr(0).chr(40).chr(0).chr(0).chr(0).chr(10).chr(0).chr(0).chr(0).chr(1).chr(0);
echo chr(24).chr(0).chr(0).chr(0).chr(0).chr(0).chr(176).chr(4).chr(0).chr(0).chr(18).chr(11).chr(0).chr(0).chr(18).chr(11).chr(0).chr(0).chr(0).chr(0).chr(0).chr(0).chr(0).chr(0).chr(0).chr(0);
for ($i=9;$i>=0;$i--){
for ($j=0;$j<=3;$j++){
for ($k=1;$k<=10;$k++){
if(mt_rand(0,7)<1){
echo $Color[mt_rand(0,1)];
}else{
echo $Color[substr($_Num[$nmsg[$j]], $i * 10 + $k, 1)];
}
}
}
}
exit;
}
function StrCode($string,$action='ENCODE'){
$key = substr(md5($_SERVER["HTTP_USER_AGENT"].$GLOBALS['db_hash']),8,18);
$string = $action == 'ENCODE' ? $string : base64_decode($string);
$len = strlen($key);
$code = '';
for($i=0; $i<strlen($string); $i++){
$k = $i % $len;
$code .= $string[$i] ^ $key[$k];
}
$code = $action == 'DECODE' ? $code : base64_encode($code);
return $code;
}
function Cookie($ck_Var,$ck_Value,$ck_Time = 'F'){
global $db_ckpath,$db_ckdomain,$timestamp;
$ck_Time = $ck_Time == 'F' ? $timestamp + 31536000 : ($ck_Value == '' && $ck_Time == 0 ? $timestamp - 31536000 : $ck_Time);
$S = $_SERVER['SERVER_PORT'] == '443' ? 1:0;
!$db_ckpath && $db_ckpath = '/';
setCookie(CookiePre().'_'.$ck_Var,$ck_Value,$ck_Time,$db_ckpath,$db_ckdomain,$S);
}
function CookiePre(){
return substr(md5($GLOBALS['db_hash']),0,5);
}
function GetCookie($Var){
return $_COOKIE[CookiePre().'_'.$Var];
}
function readover(){
}
function writeover($filename,$data,$method="rb+",$iflock=1,$check=1,$chmod=1){
//Copyright (c) 2003-06 PHPWind
$check && strpos($filename,'..')!==false && exit('Forbidden');
touch($filename);
$handle=fopen($filename,$method);
if($iflock){
flock($handle,LOCK_EX);
}
fwrite($handle,$data);
if($method=="rb+") ftruncate($handle,strlen($data));
fclose($handle);
$chmod && @chmod($filename,0777);
}
function num_rand($lenth){
mt_srand((double)microtime() * 1000000);
for($i=0;$i<$lenth;$i++){
$randval.= mt_rand(1,6);
}
return $randval;
}
function randstr($lenth){
mt_srand((double)microtime() * 1000000);
for($i=0;$i<$lenth;$i++){
$randval.= mt_rand(0,9);
} $randval=substr(md5($randval.time().$_SERVER["HTTP_USER_AGENT"].$GLOBALS['db_hash']),mt_rand(0,32-$lenth),$lenth);
return $randval;
}
?>
push _hWnd
pop @stBrowseInfo.hwndOwner
push _lpszBuffer
pop _BrowseFolderTmp
mov @stBrowseInfo.lpfn,offset _BrowseFolderCallBack
mov @stBrowseInfo.lpszTitle,offset _szDirInfo
mov @stBrowseInfo.ulFlags,BIF_RETURNONLYFSDIRS or BIF_STATUSTEXT
invoke SHBrowseForFolder,addr @stBrowseInfo
mov @pidlParent,eax
.if eax != NULL
invoke SHGetPathFromIDList,eax,_lpszBuffer
mov eax,TRUE
.else
mov eax,FALSE
.endif
mov @dwReturn,eax
mov eax,@stMalloc
mov eax,[eax]
invoke (IMalloc PTR [eax]).Free,@stMalloc,@pidlParent
mov eax,@stMalloc
mov eax,[eax]
invoke (IMalloc PTR [eax]).Release,@stMalloc
@@:
invoke CoUninitialize
popad
mov eax,@dwReturn
ret
public partial class XZ_XZYB1 : PageBase
{
ClassDb cdb = new ClassDb();
#region 载入页面
protected void Page_Load(object sender, EventArgs e)
{
//登陆判断
ReLoad();
//权限判断
check_quanxian();
//删除记录前提示
if (!IsPostBack)
{
this.Btn_del.Attributes.Add("onclick", "return confirm('你确实要删除该记录吗??')");
this.data_binding();
}
}
#endregion
#region 数据绑定
private void data_binding()
{
String str_sql = "";
if (TextBox2.Text == "")
{
//查询条件为空时,显示所有记录
str_sql = "SELECT id, station,month_cheshu, month_dunshu,leiji_cheshu, leiji_dunshu, shaQ_zhouzhuan, Good_zhouzhuan,yun_fee," +
"(case rep_bs when '0' then '否' when '1' then '是' end ) as rep_bs, " +
" CAST(YEAR(start_date) AS varchar(4)) + '-' + CAST(MONTH(start_date) AS varchar(2))+ '-' + CAST(DAY(start_date) AS varchar(2))+'至'+" +
" CAST(MONTH(end_date) AS varchar(2))+ '-' + CAST(DAY(end_date) AS varchar(2)) as end_date from XZYB1 order by rep_bs asc,end_date desc";
}
else
{
//按照条件输入的格式进行筛选
str_sql = "SELECT id, station, month_cheshu, month_dunshu,leiji_cheshu, leiji_dunshu, shaQ_zhouzhuan, Good_zhouzhuan,yun_fee," +
"(case rep_bs when '0' then '否' when '1' then '是' end ) as rep_bs, " +
" CAST(YEAR(start_date) AS varchar(4)) + '-' + CAST(MONTH(start_date) AS varchar(2))+ '-' + CAST(DAY(start_date) AS varchar(2))+'至'+" +
" CAST(MONTH(end_date) AS varchar(2))+ '-' + CAST(DAY(end_date) AS varchar(2)) as end_date from XZYB1";
//当输入为年时
if (TextBox2.Text.Length == 4)
{
str_sql = str_sql + " where convert(char(4),end_date,120)='" + date_weishu(TextBox2.Text) + "' order by rep_bs asc,end_date desc";
}
//当输入为年月时
else if (TextBox2.Text.Length > 4 && TextBox2.Text.Length <= 7)
{
str_sql = str_sql + " where convert(char(7),end_date,120)='" + date_weishu(TextBox2.Text) + "' order by rep_bs asc,end_date desc";
}
//当输入为年月日时
else if (TextBox2.Text.Length > 7)
{
str_sql = str_sql + " where convert(char(10),end_date,120)='" + date_weishu(TextBox2.Text) + "' order by rep_bs asc,end_date desc";
}
}
Exception exp = null;
DataSet dat = new DataSet();
cdb.ExecuteSqlResultDataSet(str_sql, dat, exp);
init_page(dat, GridView1, Label1, Label2);
//绑定到datagrid
GridView1.DataSource = dat;
GridView1.DataBind();
}
#endregion
#region 翻页
//到第几页
protected void btn_go_Click(object sender, EventArgs e)
{
GridView1.PageIndex = int.Parse(TextBox1.Text) - 1;
data_binding();
}
//上一页
protected void Pre_Click(object sender, EventArgs e)
{
page_change(sender, Label2, GridView1);
data_binding();
}
//下一页
protected void Next_Click(object sender, EventArgs e)
{
page_change(sender, Label2, GridView1);
data_binding();
}
//末页
protected void Last_Click(object sender, EventArgs e)
{
page_change(sender, Label2, GridView1);
data_binding();
}
//首页
protected void First_Click(object sender, EventArgs e)
{
page_change(sender, Label2, GridView1);
data_binding();
}
#endregion
#region 添加
protected void Btn_Add_Click(object sender, EventArgs e)
{
//转到添加页面
Response.Redirect("XZYB1AddEdit.aspx?bs=1");
}
#endregion
#region
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
}
#endregion
#region 删除
protected void Btn_del_Click(object sender, EventArgs e)
{
SqlConnection con = cdb.CreateContion();
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox cb = (CheckBox)this.GridView1.Rows[i].FindControl("CheckBox1");
if (cb.Checked)
{
//已上报的记录普通用户无法删除
if (Session["quanxian"].ToString() == "0")
{
if (GridView1.Rows[i].Cells[9].Text =="是")
{
MessageBox("已上报的记录无法删除,请刷新页面");
return;
}
}
cmd.CommandText = "delete from [XZYB1] where id='" + GridView1.Rows[i].Cells[1].Text + "'";
cmd.ExecuteNonQuery();
}
}
con.Close();
this.data_binding();
this.CheckBox2.Checked = false;
}
#endregion
#region 修改
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
//进入修改页面,并传入修改标识
Response.Redirect("XZYB1AddEdit.aspx?bs=2&id=" + GridView1.Rows[e.NewEditIndex].Cells[1].Text );
}
#endregion
#region 报表查询
protected void Btn_search_Click(object sender, EventArgs e)
{
//进入查询页面
Response.Redirect("XZYB1Search.aspx");
}
#endregion
#region 全选
protected void CheckBox2_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox2.Checked)
{
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
CheckBox chk = (CheckBox)this.GridView1.Rows[i].Cells[0].FindControl("CheckBox1");
chk.Checked = true;
}
}
else
{
for (int i = 0; i < this.GridView1.Rows.Count; i++)
{
CheckBox chk = (CheckBox)this.GridView1.Rows[i].Cells[0].FindControl("CheckBox1");
chk.Checked = false;
}
}
}
#endregion
#region 当前查询
protected void Btn_chx_Click(object sender, EventArgs e)
{
//将记录传入数据绑定函数
if (Check_date(TextBox2) == true)
{
data_binding();
}
}
#endregion
#region 上报
protected void btn_rep_Click(object sender, EventArgs e)
{
Exception exp = null;
String temp_id = "";//临时变量
for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox chk = (CheckBox)GridView1.Rows[i].Cells[0].FindControl("CheckBox1");
if (chk.Checked)
{
temp_id = GridView1.Rows[i].Cells[1].Text;
cdb.ExecuteSqlNoResult("update XZYB1 set rep_bs='1' where id=" + temp_id, exp);
}
}
this.MessageBox("上报成功!");
data_binding();
this.CheckBox2.Checked = false;
}
#endregion
#region 检查权限
private void check_quanxian()
{
string quanxian = Session["quanxian"].ToString();
//为普通用户时,查询按钮不可见
if (quanxian == "0")
{
btn_look.Visible = false;
}
//为领导查询时,添加,删除,上报按钮不可见
else if (quanxian == "1")
{
Button1.Visible = false;
Btn_del.Visible = false;
Button3.Visible = false;
}
}
#endregion
private decimal Total3;
private decimal Total4;
private decimal Total5;
private decimal Total6;
private decimal Total7;
private decimal Total8;
private decimal Total9;
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Total3 += decimal.Parse(e.Row.Cells[3].Text);
Total4 += decimal.Parse(e.Row.Cells[4].Text);
Total5 += decimal.Parse(e.Row.Cells[5].Text);
Total6 += decimal.Parse(e.Row.Cells[6].Text);
Total7 += decimal.Parse(e.Row.Cells[7].Text);
Total8 += decimal.Parse(e.Row.Cells[8].Text);
Total9 += decimal.Parse(e.Row.Cells[9].Text);
}
else if (e.Row.RowType == DataControlRowType.Footer)
{
e.Row.Cells[1].Text = "合计";
e.Row.Cells[2].Text = "所有站";
e.Row.Cells[3].Text = Total3.ToString();
e.Row.Cells[4].Text = Total4.ToString();
e.Row.Cells[5].Text = Total5.ToString();
e.Row.Cells[6].Text = Total6.ToString();
e.Row.Cells[7].Text = Total7.ToString();
e.Row.Cells[8].Text = Total8.ToString();
e.Row.Cells[9].Text = Total9.ToString();
}
}
}
Response.Redirect("www.811118.com");