Esempio n. 1
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InitDataGridView(object sender, EventArgs_KindofEmployer e)
        {
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Exam, Enum_DataTable.IssueStudentQCRegistrationNo.ToString(), false);
            this.myEventArgs_KindofEmployer = e;
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Data, Enum_DataTable.KindofEmployerWelder.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.KindofEmployerWelder.ToString()];

            myClass_Data.SetFilter(string.Format("KindofEmployer='{0}'", this.myEventArgs_KindofEmployer.str_KindofEmployer));
            if (this.myEventArgs_KindofEmployer.bool_JustFill)
            {
                if (this.myDataTable.Rows.Count == 0)
                {
                    this.dataGridView_Data.DataSource = null;
                    myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill);
                    this.myDataTable = myClass_Data.myDataTable.Copy();
                    this.myDataView  = new DataView(this.myDataTable);
                    this.dataGridView_Data.DataSource = this.myDataView;
                }
                else
                {
                    myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill, this.myDataTable);
                }
            }
            else
            {
                this.dataGridView_Data.DataSource = null;
                myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill);
                this.myDataTable = myClass_Data.myDataTable.Copy();
                this.myDataView  = new DataView(this.myDataTable);
                this.dataGridView_Data.DataSource = this.myDataView;
            }
            if (string.IsNullOrEmpty(((DataView)this.dataGridView_Data.DataSource).Sort))
            {
                ((DataView)this.dataGridView_Data.DataSource).Sort = myClass_Data.myDataView.Sort;
            }
            this.label_Data.Text = string.Format("报考单位焊工信息,({0}):", this.dataGridView_Data.RowCount);
            if (this.dataGridView_Data.CurrentRow == null)
            {
                this.dataGridView_Exam.DataSource = null;
                this.label_Exam.Text = "考试记录:";
                this.userControl_WelderPictureBase1.InitWelderPicture(null);
            }

            Class_KindofEmployer myClass_KindofEmployer = new Class_KindofEmployer(e.str_KindofEmployer);

            this.userControl_WelderPictureBase1.button_UploadPicture.Visible = myClass_KindofEmployer.CanUpLoadWelderPicture;
            this.userControl_WelderPictureBase1.button_DeletePicture.Visible = myClass_KindofEmployer.CanDeleteWelderPicture;
            this.userControl_WelderPictureBase1.bool_CanModifyWelderPicture  = myClass_KindofEmployer.CanModifyWelderPicture;
        }
        private void treeView_Data_AfterSelect(object sender, TreeViewEventArgs e)
        {
            EventArgs_KindofEmployer myEventArgs_KindofEmployer = new EventArgs_KindofEmployer();

            switch (this.treeView_Data.SelectedNode.Level)
            {
            case 0:
                break;

            case 1:
                myEventArgs_KindofEmployer.str_KindofEmployer = this.treeView_Data.SelectedNode.Tag.ToString();
                Publisher_KindofEmployer.OnEventName(myEventArgs_KindofEmployer);
                break;
            }
        }
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InitDataGridView(object sender, EventArgs_KindofEmployer e)
        {
            this.myEventArgs_KindofEmployer = e;
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Data, Enum_DataTable.KindofEmployerIssue.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.KindofEmployerIssue.ToString()];

            myClass_Data.SetFilter(string.Format("KindofEmployer='{0}'", this.myEventArgs_KindofEmployer.str_KindofEmployer));
            if (this.myEventArgs_KindofEmployer.bool_JustFill)
            {
                if (this.myDataTable.Rows.Count == 0)
                {
                    this.dataGridView_Data.DataSource = null;
                    myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill);
                    this.myDataTable = myClass_Data.myDataTable.Copy();
                    this.myDataView  = new DataView(this.myDataTable);
                    this.dataGridView_Data.DataSource = this.myDataView;
                }
                else
                {
                    myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill, this.myDataTable);
                }
            }
            else
            {
                this.dataGridView_Data.DataSource = null;
                myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill);
                this.myDataTable = myClass_Data.myDataTable.Copy();
                this.myDataView  = new DataView(this.myDataTable);
                this.dataGridView_Data.DataSource = this.myDataView;
            }
            if (string.IsNullOrEmpty(((DataView)this.dataGridView_Data.DataSource).Sort))
            {
                ((DataView)this.dataGridView_Data.DataSource).Sort = myClass_Data.myDataView.Sort;
            }
            this.label_Data.Text = string.Format("报考单位班级信息,({0}):", this.dataGridView_Data.RowCount);
            if (this.dataGridView_Data.Rows.Count == 0)
            {
                EventArgs_KindofEmployerIssue myEventArgs_KindofEmployerIssue = new EventArgs_KindofEmployerIssue();
                myEventArgs_KindofEmployerIssue.int_KindofEmployerIssueID = 0;
                Publisher_KindofEmployerIssue.OnEventName(myEventArgs_KindofEmployerIssue);
            }
        }
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InitDataGridView(object sender, EventArgs_KindofEmployer e)
        {
            this.myEventArgs_KindofEmployer = e;
            Class_DataControlBind.InitializeDataGridView(this.dataGridView_Data, Enum_DataTable.KindofEmployerExam.ToString(), false);
            Class_Data myClass_Data = (Class_Data)Class_Public.myHashtable[Enum_DataTable.KindofEmployerExam.ToString()];

            if (this.myDataTable == null)
            {
                myClass_Data.SetFilter("1=1");
                this.dataGridView_Data.DataSource = null;
                myClass_Data.RefreshData(this.myEventArgs_KindofEmployer.bool_JustFill);
                this.myDataTable = myClass_Data.myDataTable.Copy();
                this.myDataView  = new DataView(this.myDataTable);
                this.dataGridView_Data.DataSource = this.myDataView;
            }
            ((DataView)this.dataGridView_Data.DataSource).RowFilter = string.Format("KindofEmployer='{0}'", this.myEventArgs_KindofEmployer.str_KindofEmployer);;
            if (string.IsNullOrEmpty(((DataView)this.dataGridView_Data.DataSource).Sort))
            {
                ((DataView)this.dataGridView_Data.DataSource).Sort = myClass_Data.myDataView.Sort;
            }

            this.label_Data.Text = string.Format("考试记录,({0}):", this.dataGridView_Data.RowCount);
        }
Esempio n. 5
0
 private void InitstatusStrip(object sender, EventArgs_KindofEmployer e)
 {
     this.myEventArgs_KindofEmployer = e;
     this.toolStripStatusLabel_KindofEmployer.Text = string.Format("±¨¿¼µ¥Î»£º{0}", e.str_KindofEmployer);
 }