Example #1
0
    protected void GVManager_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex > -1)
        {
            DataRowView dataRowView = (DataRowView)e.Row.DataItem;
            e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
            e.Row.Attributes["onclick"]     = "OnRecord(this);";
            e.Row.Cells[0].Text             = Convert.ToString(e.Row.RowIndex + 1);
            HtmlInputText htmlInputText = (HtmlInputText)e.Row.Cells[3].FindControl("txtRation");
            htmlInputText.Attributes["onblur"] = "javascript:checkDecimal(this);";
            e.Row.Cells[1].Text = OAOfficeCommonClas.GetChinaNum(dataRowView["PostLevel"].ToString());
        }
        switch (e.Row.RowType)
        {
        case DataControlRowType.Header:
        case DataControlRowType.DataRow:
            e.Row.Cells[5].Style["display"] = "none";
            break;

        case DataControlRowType.Footer:
            break;

        default:
            return;
        }
    }
Example #2
0
 protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = "OnRecord(this);ClickRow('" + dataRowView["RecordID"].ToString() + "');";
         e.Row.Cells[0].Text             = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[1].Text             = OAOfficeCommonClas.GetChinaNum(dataRowView["PositionLevel"].ToString());
     }
 }
Example #3
0
 protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             dataRowView["v_yhdm"].ToString(),
             "','",
             dataRowView["PositionLevel"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[1].Text = BooksCommonClass.GetDepartmentName(int.Parse(dataRowView["i_bmdm"].ToString()));
         e.Row.Cells[3].Text = OAOfficeCommonClas.GetChinaNum(dataRowView["PositionLevel"].ToString());
         e.Row.Cells[4].Text = OAOfficeCommonClas.GetPostAndRank(dataRowView["PostAndRank"].ToString());
     }
 }