杂七杂八的

光棒效果
 //首先判断是否是数据行
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //当鼠标停留时更改背景色
            e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#d4d0c8'");
            //当鼠标移开时还原背景色
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
        }


 //建立满意度图片url column  ImageField
 DataColumn col = new DataColumn("satisfyImgCol");

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            if (dt.Rows[i]["satisfy_lvl"].ToString() != "")
            {
                dt.Rows[i]["satisfyImgCol"] = ResolveUrl("~/image/" + dt.Rows[i]["satisfy_lvl"].ToString() + ".gif");
            }
            else
            {
                string str = ResolveUrl("~/image/0.gif");
                dt.Rows[i]["satisfyImgCol"] = ResolveUrl("~/image/0.gif");
            }           
        }

 

        //强迫datagrid换行
        //this.dataGridView.Attributes.Add("style", "word-break:keep-all;word-wrap:normal"); //普通换行模式
        this.dataGridView.Attributes.Add("style", "word-break:break-all;word-wrap:break-word"); //强迫datagrid换行

//打开模式窗体
    function test(hid,sid,betime,endtime)
    {
   
      window.showModalDialog("DetailByDept.aspx?hid="+hid+"&sid="+sid+"&begintime="+betime+"&endtime="+endtime,'',"dialogHeight:560px;dialogWidth:900px;status:no;");
    }

   DgvPercent.Rows[this.DgvPercent.Rows.Count - 1].Cells[a*2+1].Attributes.Add("onmouseover", "style.cursor='hand'");


        DgvPercent.Rows[this.DgvPercent.Rows.Count - 1].Cells[5].Attributes.Add("onclick", "javascrip:test('0','2','" + beginTime + "','" + endTime + "')");
    

//显示正确的小数
  select to_char(round(6/33*100, 2),'FM9990.00')  from dual
select TO_CHAR(round( count(*)/tot*100  , 2 ) ,'FM9990.00')||'%' from dual

 

 


dgComoBoxColumn = new DataGridViewComboBoxColumn();
dgComoBoxColumn.DataSource = tempSet.Tables[0];
dgComoBoxColumn.DisplayMember = "DutyName";
dgComoBoxColumn.ValueMember = "DutyId";
dgComoBoxColumn.HeaderText = "出勤情况";
dgvResult.Columns.Insert(4, dgComoBoxColumn);

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值