Example #1
0
 /// <summary>
 /// bind方法
 /// </summary>
 private void Bind()
 {
     try
     {
         CostCenterInfo CostCenterInfo = new CostCenterInfo();
         DataTable      cctable        = CostCenterInfo.GetCostCenterInfo();
         if (cctable.Rows.Count > 0)
         {
             this.GridView1.DataSource = cctable;
             this.GridView1.DataBind();
             foreach (GridViewRow ROW in GridView1.Rows)
             {
                 ROW.Cell.Items["imgUserAttention"].DefaultValue = "unAttention";
             }
         }
         else
         {
             this.GridView1.Rows.Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #2
0
 private void Bind(string confirmUser, string CCNAME)
 {
     try
     {
         CostCenterInfo CostCenterInfo = new CostCenterInfo();
         DataTable      cctable        = CostCenterInfo.GetCostCenterInfo();
         if (cctable.Rows.Count > 0)
         {
             this.GridView1.DataSource = cctable;
             this.GridView1.DataBind();
         }
         else
         {
             this.GridView1.Rows.Clear();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }