Exemplo n.º 1
0
 private void BindItems()
 {
     try
     {
         DataTable dt = objCP.GET_Trading_Period(UDFLib.ConvertIntegerToNull(ViewState["CPID"]));
         if (dt.Rows.Count > 0)
         {
             dtGridItems         = dt;
             rgdItems.DataSource = dt;
             rgdItems.DataBind();
             //rgdItems.ShowFooter = false;
         }
         else
         {
             dtGridItems         = GetAddTable();
             rgdItems.DataSource = dtGridItems;
             rgdItems.DataBind();
             // rgdItems.MasterTableView.Columns[8].Visible = false;
             //rgdItems.MasterTableView.Columns[9].Visible = false;
         }
         ViewState["dtGridItems"] = dtGridItems;
     }
     catch (Exception ex)
     {
         lblError.Text = ex.ToString();
         //.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex);
     }
     finally
     {
     }
 }