Пример #1
0
    protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            LinkButton btn = (LinkButton)e.Row.Cells[2].Controls[0];
            if (ddlPackStatus.SelectedItem.Value == "1")
            {
                btn.Attributes.Add("onclick", "return confirm('" + GetGlobalResourceObject("WebGlobalResource", "WkConfirmAbolish").ToString() + "');");    //你确认作废此业务吗?
                btn.Enabled = true;
            }
            else
            {
                btn.Enabled = false;
            }

            if (e.Row.Cells[11].Text == "" || e.Row.Cells[11].Text == " ")
            {
                e.Row.Cells[11].Text = "";
            }
            else
            {
                DateTime    start;
                CultureInfo ci = new CultureInfo("es-ES");
                try
                {
                    start = DateTime.Parse(e.Row.Cells[11].Text, ci);
                    e.Row.Cells[11].Text = WebWorkFlow.GetConsumeHours(start, DateTime.Now).ToString("f2");
                }
                catch { }
            }
        }
    }
Пример #2
0
    protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            LinkButton btn = (LinkButton)e.Row.Cells[2].Controls[0];
            if (ddlPackStatus.Text == "正常")
            {
                btn.Text = "暂缓";
                btn.Attributes.Add("onclick", "return confirm('确定要把此业务暂缓?');");
            }
            else
            {
                btn.Text = "恢复";
                btn.Attributes.Add("onclick", "return confirm('确定要把此业务恢复?');");
            }

            if (e.Row.Cells[12].Text == "" || e.Row.Cells[12].Text == " ")
            {
                e.Row.Cells[12].Text = "";
            }
            else
            {
                e.Row.Cells[12].Text = WebWorkFlow.GetConsumeHours(Convert.ToDateTime(e.Row.Cells[12].Text), DateTime.Now).ToString("f2");
            }
        }
    }
Пример #3
0
 //计算所耗小时数
 protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         if (e.Row.Cells[10].Text == "" || e.Row.Cells[10].Text == " ")
         {
             e.Row.Cells[10].Text = "";
         }
         else
         {
             e.Row.Cells[10].Text = WebWorkFlow.GetConsumeHours(Convert.ToDateTime(e.Row.Cells[10].Text), DateTime.Now).ToString("f2");
         }
     }
 }