Пример #1
0
 private void nav1_TBarClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     try
     {
         if (e.Button.Equals(nav1.cmd_add))
         {
             string st;
             if (Tree.SelectedNode.Text != "Root")
             {
                 st = T_String.Left(Tree.SelectedNode.Text, "-");
             }
             else
             {
                 st = "-1";
             }
             vs.Rows[vs.Rows.Count - 1]["H_ID"] = st;
             vs.Rows[vs.Rows.Count - 1]["ID"]   = Get_ID();
         }
         if (e.Button.Equals(nav1.cmd_report))
         {
             ArrayList arColsVisible = new ArrayList();
             for (int i = 0; i < vs.Cols.Count; i++)
             {
                 arColsVisible.Add(vs.Cols[i].Visible);
             }
             Basic.Function.ReportExcel.ExportToExcel_FromVS(vs, arColsVisible);
         }
     }
     catch (Exception) {}
 }
Пример #2
0
 private void Tree_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     if (e.Node.Text != "Root")
     {
         nav1.Show_VS("H_ID=" + T_String.Left(e.Node.Text, "-"));
     }
     else
     {
         nav1.Show_VS("H_ID=-1");
     }
 }