コード例 #1
0
ファイル: ucInventory.cs プロジェクト: itsmenayrb/finals
 public void display_inventory_archived_data()
 {
     arc = new classes.Archived();
     gbAcademicYear.Text              = "Academic Year: " + arc.select_academic_year(academic_year_id);
     inventory_archived_table         = arc.select_inventory_archived_table(academic_year_id);
     dgvInventory.DataSource          = inventory_archived_table;
     dgvInventory.AutoGenerateColumns = false;
 }
コード例 #2
0
ファイル: ucArchived.cs プロジェクト: itsmenayrb/finals
        public void display_treeview_data()
        {
            tvArchived.Nodes.Clear();
            TreeNode root          = new TreeNode("Comfama");
            string   academic_year = string.Empty;

            arc = new classes.Archived();
            archived_parent_table = arc.select_parent_table();

            foreach (DataRow row_p in archived_parent_table.Rows)
            {
                academic_year = row_p["acad_year"].ToString();
                TreeNode parent = new TreeNode(academic_year);
                root.Nodes.Add(parent);

                archived_child_table = arc.select_child_table(academic_year);

                foreach (DataRow row_c in archived_child_table.Rows)
                {
                    TreeNode child = new TreeNode
                    {
                        Text = row_c["semester"].ToString(),
                        Tag  = row_c["id"].ToString()
                    };

                    parent.Nodes.Add(child);

                    child.Nodes.Add("Inventory");
                    child.Nodes.Add("Job Requests");
                    child.Nodes.Add("Login History");
                }
            }

            tvArchived.Nodes.Add(root);
            tvArchived.ExpandAll();
        }