示例#1
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InitDataGridView(object sender, EventArgs_WeldingStandard e)
        {
            this.myEventArgs_WeldingStandard = e;
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Data, Enum_DataTable.WeldingSubject.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingSubject.ToString()];

            if (this.myEventArgs_WeldingStandard.bool_JustFill)
            {
                myClass_Data.RefreshData(this.myEventArgs_WeldingStandard.bool_JustFill);
            }
            else
            {
                this.dataGridView_Data.DataSource = null;
                myClass_Data.RefreshData(this.myEventArgs_WeldingStandard.bool_JustFill);
                this.dataGridView_Data.DataSource = myClass_Data.myDataView;
            }
            if (string.IsNullOrEmpty(this.myEventArgs_WeldingStandard.str_WeldingStandard))
            {
                myClass_Data.myDataView.RowFilter = e.str_Filter;
            }
            else
            {
                myClass_Data.myDataView.RowFilter = string.Format("WeldingStandard='{0}'", e.str_WeldingStandard);
            }
            if (this.dataGridView_Data.RowCount == 0)
            {
                EventArgs_WeldingSubject my_e = new EventArgs_WeldingSubject(null);
                Publisher_WeldingSubject.OnEventName(my_e);
            }
            this.label_Data.Text = string.Format("考试科目,({0}):", this.dataGridView_Data.RowCount);
        }
示例#2
0
 private void InitstatusStrip(object sender, EventArgs_WeldingStandard e)
 {
     if (string.IsNullOrEmpty(e.str_WeldingStandard))
     {
         this.toolStripStatusLabel_Filter.Text = string.Format("检索条件:{0}", e.str_Filter);
     }
     else
     {
         this.toolStripStatusLabel_Filter.Text = string.Format("焊工考试标准:{0}", e.str_WeldingStandard);
     }
 }
示例#3
0
 private void treeView_Data_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (this.treeView_Data.SelectedNode.Level == 0)
     {
         EventArgs_WeldingStandard my_e = new EventArgs_WeldingStandard(null);
         Publisher_WeldingStandard.OnEventName(my_e);
     }
     else
     {
         EventArgs_WeldingStandard my_e = new EventArgs_WeldingStandard(this.treeView_Data.SelectedNode.Tag.ToString());
         Publisher_WeldingStandard.OnEventName(my_e);
     }
 }
示例#4
0
        private void InitTreeView()
        {
            this.treeView_Data.Nodes.Clear();
            TreeNode myTreeNode;
            TreeNode myTreeNode_WeldingStandard;
            DataView myDataView_WeldingStandard = new DataView(((Class_Data)Class_Public.myHashtable[Enum_DataTable.WeldingStandardAndGroup.ToString()]).myDataTable);

            myDataView_WeldingStandard.RowFilter = "WeldingStandardGroup='焊工考试标准'";

            myTreeNode      = new TreeNode();
            myTreeNode.Text = "全部";
            myTreeNode.Tag  = "全部";

            foreach (DataRowView myDataRowView in myDataView_WeldingStandard)
            {
                myTreeNode_WeldingStandard      = new TreeNode();
                myTreeNode_WeldingStandard.Text = myDataRowView["WeldingStandard"].ToString();
                myTreeNode_WeldingStandard.Tag  = myDataRowView["WeldingStandard"].ToString();
                myTreeNode.Nodes.Add(myTreeNode_WeldingStandard);
            }

            this.treeView_Data.Nodes.Add(myTreeNode);
            if (this.treeView_Data.SelectedNode != null)
            {
                if (this.treeView_Data.SelectedNode.Level == 0)
                {
                    EventArgs_WeldingStandard my_e = new EventArgs_WeldingStandard(null);
                    Publisher_WeldingStandard.OnEventName(my_e);
                }
                else
                {
                    EventArgs_WeldingStandard my_e = new EventArgs_WeldingStandard(this.treeView_Data.SelectedNode.Tag.ToString());
                    Publisher_WeldingStandard.OnEventName(my_e);
                }
            }
            else
            {
                EventArgs_WeldingStandard my_e = new EventArgs_WeldingStandard(null);
                Publisher_WeldingStandard.OnEventName(my_e);
            }
            this.label_Data.Text = string.Format("焊工考试标准,({0}):", myDataView_WeldingStandard.Count);
        }