예제 #1
0
 protected void GridViewCriterion_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         DataRowView arg_21_0 = (DataRowView)e.Row.DataItem;
         string      text     = this.GridViewCriterion.DataKeys[e.Row.RowIndex].Values[0].ToString();
         e.Row.Attributes["id"]    = text;
         e.Row.Attributes["style"] = "cursor:hand";
         CheckBox checkBox = (CheckBox)e.Row.Cells[0].FindControl("chk");
         checkBox.Attributes["class"] = "chk";
         checkBox.Attributes["id"]    = text;
         Label label = (Label)e.Row.Cells[0].FindControl("Label3");
         label.Attributes["style"] = "display:none";
         if (CriterionList.IsNumber(e.Row.Cells[4].Text))
         {
             e.Row.Cells[4].Text = com.jwsoft.pm.entpm.PageHelper.QueryDept(this, Convert.ToInt32(e.Row.Cells[4].Text.Trim()));
         }
         else
         {
             e.Row.Cells[4].Text = "";
         }
         e.Row.Attributes["onclick"] = "clickRow(this);";
         string text2 = CriterionList.StripHTML(e.Row.Cells[5].Text);
         e.Row.Cells[5].ToolTip = text2;
         if (text2.Length > 20)
         {
             text2 = text2.Substring(0, 19) + "…";
         }
         e.Row.Cells[5].Text = text2;
         Label label2 = (Label)e.Row.Cells[2].FindControl("Label1");
         this.Session["DATUMCLASS"].ToString();
         label2.Attributes["onclick"] = string.Concat(new object[]
         {
             "OpType('See','",
             this.Session["DATUMCLASS"],
             "','",
             text,
             "');"
         });
         if (CriterionList._typeVal == "List")
         {
             e.Row.Cells[0].Text    = "";
             e.Row.Cells[0].Visible = false;
             return;
         }
     }
     else
     {
         if (e.Row.RowType == DataControlRowType.Header)
         {
             e.Row.Cells[2].Text = this.listTitleStr;
             if (CriterionList._typeVal == "List")
             {
                 e.Row.Cells[0].Text    = "";
                 e.Row.Cells[0].Visible = false;
             }
         }
     }
 }