安装vs2003一开始,安装程序检测到另一个程序要求计算机重新启动,重启n次无效 的问题

解决办法:

在注册表删除

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/pendingfilerenameoperations

 

===================//DataGrid翻页

 

private   void  PageCut_Click( object  sender,System.EventArgs e)

        { 
            String commangArg
= ((LinkButton)sender).CommandArgument;
     
            
switch (commangArg)
            {
                
case   " First " :
                {
                    CustomerDatagrid.CurrentPageIndex
= 0 ;
                    
break ;
                }
                
case   " Prev " :
                {
                    CustomerDatagrid.CurrentPageIndex
= ( int )Math.Max ( 0 ,CustomerDatagrid.CurrentPageIndex - 1 );
                    
break ;


                }
                
case   " Next " :
                {
                    CustomerDatagrid.CurrentPageIndex
= ( int )Math.Min(CustomerDatagrid.CurrentPageIndex - 1 ,CustomerDatagrid.CurrentPageIndex + 1 );
                    
break ;
                }
                
case   " Last " :
                {
                    CustomerDatagrid.CurrentPageIndex
= CustomerDatagrid.PageCount - 1 ;
                    
break ;
                }
                
default : break ;    
                    
            }
            BindDataGrid();

   

        }

 

//datagrid多表头

 

private   void  dg_equip_ItemDataBound( object  sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        
{
            
if(e.Item.ItemType == ListItemType.Header)
            
{
                DataGridItem head 
= (DataGridItem)e.Item;                
                e.Item.Cells.Clear();
                
                System.Text.StringBuilder sb 
= new System.Text.StringBuilder();    
//                sb.Append("</td></tr><tr style='COLOR: #003399; HEIGHT: 20px; BACKGROUND-COLOR: #35c6c9'>");
                sb.Append("&nbsp;</td>");    
                
                sb.Append(
"<td rowspan='2'>委托单位</td>");
                sb.Append(
"<td colspan='2'>信息系统及服务</td>");
                sb.Append(
"<td colspan='2'>表计</td>");
                sb.Append(
"<td colspan='2'>办公用品</td>");
                sb.Append(
"<td colspan='2'>检测设备及仪器</td>");
                sb.Append(
"<td colspan='2'>实验设备及仪器</td>");
                sb.Append(
"<td colspan='2'>其它</td>");
                sb.Append(
"</tr>");
                sb.Append(
"<tr style='COLOR: #003399; HEIGHT: 20px; BACKGROUND-COLOR: #35c6c9'>");                
                sb.Append(
"<td>数量</td>");
                sb.Append(
"<td>金额</td>");
                sb.Append(
"<td>数量</td>");
                sb.Append(
"<td>金额</td>");
                sb.Append(
"<td>数量</td>");
                sb.Append(
"<td>金额</td>");
                sb.Append(
"<td>数量</td>");
                sb.Append(
"<td>金额</td>");
                sb.Append(
"<td>数量</td>");
                sb.Append(
"<td>金额</td>");
                sb.Append(
"<td>数量</td>");
                sb.Append(
"<td>金额</td>");
                    
                TableCell tc
= new TableCell();                
                tc.RowSpan
=2;
                tc.Text
=sb.ToString();
                e.Item.Cells.Add(tc);                                        
                
            }

 

//datagrid合并行

 

  private      string  type1 = "" ;
        
private   int  rows2  =   1 ;
        
private   int  item2  =   1 ;
        
private   void  rpt_body_ItemDataBound( object  sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
        {        
            
            DataGrid dg
= (DataGrid)sender;
            
if (dg.Items .Count  == 0 )
            {
                type1
= "" ;
                rows2 
=   1 ;
                item2 
=   1 ;

            }

            
if  (e.Item.ItemType  ==  ListItemType.Item ||  e.Item.ItemType  ==  ListItemType.AlternatingItem)
            {
                
                    dgstyle.SetDataGridBackColor(e.Item);                        
                
            }

            
// 合并相同电压类型
        
            
if (e.Item.ItemType != ListItemType.Header && e.Item.ItemType !=  ListItemType.Footer && e.Item.ItemType !=  ListItemType.Pager)
            {
                
                
                
try
                {
                    
                    
if (e.Item.Cells[ 0 ].Text != type1)
                    {
                        
                        
if (rows2 > 1 )
                        {
                            dg_data.Items[item2].Cells[
0 ].RowSpan  =  rows2;
                        }
                        rows2 
=   1 ;
                        item2 
=  e.Item.ItemIndex;
                        type1
= e.Item.Cells[ 0 ].Text;
                    
                    }
                    
else
                    {
                        rows2 
++ ;
                        e.Item.Cells[
0 ].Visible = false ;
                    }
                }
                
catch {}
            }
                
            
else
            {
                
if (rows2 > 1  )
                {
                    
if (dg.Items .Count  > 1 )
                    {
                        dg.Items[item2].Cells[
0 ].RowSpan  =  rows2;
                    }
                    
                }

                
            }
            
        }

 //js导入EXCEL、WORD

 

// 指定页面区域内容导入Excel
  function  AllAreaExcel(ElementName) 
 {
  
// alert('ddddd');
   var  oXL  =   new  ActiveXObject( " Excel.Application " ); 
  
var  oWB  =  oXL.Workbooks.Add(); 
  
var  oSheet  =  oWB.ActiveSheet;  
  
var  sel = document.body.createTextRange();
  sel.moveToElementText(document.getElementById(ElementName));
  sel.select();
  sel.execCommand(
" Copy " );
  oSheet.Paste();
  oXL.Visible 
=   true ;
 }
 
// 指定页面区域“单元格”内容导入Excel
  function  CellAreaExcel(ElementName) 
 {
var  obj = document.getElementById(ElementName);
  
var  oXL  =   new  ActiveXObject( " Excel.Application " ); 
  
var  oWB  =  oXL.Workbooks.Add(); 
  
var  oSheet  =  oWB.ActiveSheet; 
  
var  Lenr  =  obj.rows.length;
  
for  (i = 0 ;i < Lenr;i ++
  { 
   
var  Lenc  =  obj.rows(i).cells.length; 
   
for  (j = 0 ;j < Lenc;j ++
   { 
    oSheet.Cells(i
+ 1 ,j + 1 ).value  =  obj.rows(i).cells(j).innerText; 
   } 
  } 
  oXL.Visible 
=   true
 }

 
// 指定页面区域内容导入Word
  function  AllAreaWord(ElementName)
 {
    
//  alert('ddddd');
   var  oWD  =   new  ActiveXObject( " Word.Application " );
  
var  oDC  =  oWD.Documents.Add( "" , 0 , 1 );
  
var  oRange  = oDC.Range( 0 , 1 );
  
var  sel  =  document.body.createTextRange();
  sel.moveToElementText(document.getElementById(ElementName));
  sel.select();
  sel.execCommand(
" Copy " );
  oRange.Paste();
  oWD.Application.Visible 
=   true ;
  
// window.close();
 }

 //中文转GB2312

 

private   void  LinkButton1_Click( object  sender, System.EventArgs e)
        {
            
// LinkButton1.Text="北京";
            Response.Redirect ( " http://map.baidu.com/#word= " + System.Web.HttpUtility.UrlEncode( this .LinkButton1 .Text .ToString (),System.Text .Encoding.GetEncoding ( " gb2312 " )) + " &ct=10 " );
        }

 

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值