Ejemplo n.º 1
0
        private void toolStripMenuItem_RowTransferToGXTheoryIssue_Click(object sender, EventArgs e)
        {
            Form_GXTheoryIssue_Query myForm = new Form_GXTheoryIssue_Query();

            myForm.myClass_GXTheoryIssue = new Class_GXTheoryIssue();
            if (!string.IsNullOrEmpty(this.str_IssueNo))
            {
                myForm.myClass_GXTheoryIssue.IssueNo = this.str_IssueNo;
                myForm.myClass_GXTheoryIssue.FillData();
            }
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                this.str_IssueNo = myForm.myClass_GXTheoryIssue.IssueNo;
            }
            else
            {
                return;
            }

            if (Class_GXTheoryIssue.ExistAndCanDeleteAndDelete(this.str_IssueNo, Enum_zwjKindofUpdate.Exist))
            {
                Class_KindofEmployerStudent myClass_KindofEmployerStudent = new Class_KindofEmployerStudent((int)this.dataGridView_Data.CurrentRow.Cells["KindofEmployerStudentID"].Value);
                Class_KindofEmployerWelder  myClass_KindofEmployerWelder  = new Class_KindofEmployerWelder(myClass_KindofEmployerStudent.KindofEmployerWelderID);
                Class_GXTheoryStudent       myClass_GXTheoryStudent       = new Class_GXTheoryStudent();
                myClass_GXTheoryStudent.IssueNo            = this.str_IssueNo;
                myClass_GXTheoryStudent.IdentificationCard = myClass_KindofEmployerWelder.IdentificationCard;
                myClass_GXTheoryStudent.SubjectID          = myClass_KindofEmployerStudent.ExamSubjectID;
                Class_GXTheoryIssue myClass_GXTheoryIssue = new Class_GXTheoryIssue(myClass_GXTheoryStudent.IssueNo);
                myClass_GXTheoryStudent.KindofExam = myClass_GXTheoryIssue.KindofExam;
                string str_ReturnMessage;
                str_ReturnMessage = myClass_GXTheoryStudent.CheckField();
                if (string.IsNullOrEmpty(str_ReturnMessage))
                {
                    Class_KindofEmployerWelder.TransferWelder(myClass_KindofEmployerStudent.KindofEmployerWelderID);
                    myClass_GXTheoryStudent.AddAndModify(Enum_zwjKindofUpdate.Add);
                    if (string.IsNullOrEmpty(myClass_GXTheoryStudent.ExaminingNo))
                    {
                        MessageBox.Show("编入理论班级失败,可能是下一个理论考编号设置错误!");
                    }
                    else
                    {
                        Class_KindofEmployerStudent.ExistAndCanDeleteAndDelete(myClass_KindofEmployerStudent.KindofEmployerStudentID, Enum_zwjKindofUpdate.Delete);
                        this.myEventArgs_KindofEmployerIssue.bool_JustFill = false;
                        Publisher_KindofEmployerIssue.OnEventName(this.myEventArgs_KindofEmployerIssue);
                        MessageBox.Show(string.Format("编入班级成功,理论班级编号为 {0},理论考编号为 {1}", this.str_IssueNo, myClass_GXTheoryStudent.ExaminingNo));
                    }
                }
                else
                {
                    MessageBox.Show(string.Format("编入理论班级失败,{0}!", str_ReturnMessage));
                }
            }
            else
            {
                MessageBox.Show(string.Format("不存在理论班级编号为 {0} 的班级!", this.str_IssueNo));
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripMenuItem_DataGridViewRowDelete_Click(object sender, EventArgs e)
 {
     if (Class_KindofEmployerStudent.ExistAndCanDeleteAndDelete((int)this.dataGridView_Data.CurrentRow.Cells["KindofEmployerStudentID"].Value, Enum_zwjKindofUpdate.CanDelete))
     {
         if (MessageBox.Show("确认删除吗?", "确认窗口", MessageBoxButtons.OKCancel) == DialogResult.OK)
         {
             Class_KindofEmployerStudent.ExistAndCanDeleteAndDelete((int)this.dataGridView_Data.CurrentRow.Cells["KindofEmployerStudentID"].Value, Enum_zwjKindofUpdate.Delete);
             this.RefreshData(false);
         }
     }
     else
     {
         MessageBox.Show("不能删除!");
     }
 }
 private void Form_KindofEmployerStudent_Update_Load(object sender, EventArgs e)
 {
     if (!(this.bool_Add || Class_KindofEmployerStudent.ExistAndCanDeleteAndDelete(myClass_KindofEmployerStudent.KindofEmployerStudentID, Enum_zwjKindofUpdate.Exist)))
     {
         MessageBox.Show("不存在该项,可能已删除!");
         this.DialogResult = DialogResult.Cancel;
         this.Close();
         return;
     }
     this.label_ErrMessage.Text = "";
     if (!Class_zwjPublic.myBackColor.IsEmpty)
     {
         this.BackColor = Class_zwjPublic.myBackColor;
     }
     this.userControl_KindofEmployerStudent_Base1.InitControl(this.myClass_KindofEmployerStudent, this.bool_Add);
 }
Ejemplo n.º 4
0
        private void toolStripMenuItem_RowTransferToIssue_Click(object sender, EventArgs e)
        {
            //Form_InputBox myForm = new Form_InputBox();
            //myForm.str_DefaultResponse = this.str_IssueNo;
            //myForm.str_Prompt = "请输入班级编号:";
            //myForm.str_Title = "输入班级编号";
            //if (myForm.ShowDialog() == DialogResult.OK)
            //{
            //    this.str_IssueNo = myForm.str_DefaultResponse;
            //}
            //else
            //{
            //    return;
            //}
            Form_Issue_Query myForm = new Form_Issue_Query();

            myForm.myClass_Issue = new Class_Issue();
            if (!string.IsNullOrEmpty(this.str_IssueNo))
            {
                myForm.myClass_Issue.IssueNo = this.str_IssueNo;
                myForm.myClass_Issue.FillData();
            }
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                this.str_IssueNo = myForm.myClass_Issue.IssueNo;
            }
            else
            {
                return;
            }

            if (Class_Issue.ExistAndCanDeleteAndDelete(this.str_IssueNo, Enum_zwjKindofUpdate.Exist))
            {
                Class_KindofEmployerStudent myClass_KindofEmployerStudent = new Class_KindofEmployerStudent((int)this.dataGridView_Data.CurrentRow.Cells["KindofEmployerStudentID"].Value);
                Class_KindofEmployerWelder  myClass_KindofEmployerWelder  = new Class_KindofEmployerWelder(myClass_KindofEmployerStudent.KindofEmployerWelderID);
                Class_Student myClass_Student = new Class_Student();
                myClass_Student.IssueNo            = this.str_IssueNo;
                myClass_Student.IdentificationCard = myClass_KindofEmployerWelder.IdentificationCard;
                myClass_Student.SubjectID          = myClass_KindofEmployerStudent.ExamSubjectID;
                Class_Issue myClass_Issue = new Class_Issue(myClass_Student.IssueNo);
                myClass_Student.myClass_WeldingParameter            = myClass_Issue.myClass_WeldingParameter;
                myClass_Student.myClass_WeldingParameter.KindofExam = myClass_KindofEmployerStudent.StudentKindofExam;
                Class_KindofEmployerIssue myClass_KindofEmployerIssue = new Class_KindofEmployerIssue(myClass_KindofEmployerStudent.KindofEmployerIssueID);
                myClass_Student.WPSNo = myClass_KindofEmployerIssue.IssueWPSNo;
                string str_ReturnMessage;
                str_ReturnMessage = myClass_Student.CheckField();
                if (string.IsNullOrEmpty(str_ReturnMessage))
                {
                    Class_KindofEmployerWelder.TransferWelder(myClass_KindofEmployerStudent.KindofEmployerWelderID);
                    myClass_Student.AddAndModify(Enum_zwjKindofUpdate.Add);
                    if (string.IsNullOrEmpty(myClass_Student.ExaminingNo))
                    {
                        MessageBox.Show("编入班级失败,可能是下一个考编号设置错误!");
                    }
                    else
                    {
                        Class_KindofEmployerStudent.ExistAndCanDeleteAndDelete(myClass_KindofEmployerStudent.KindofEmployerStudentID, Enum_zwjKindofUpdate.Delete);
                        this.myEventArgs_KindofEmployerIssue.bool_JustFill = false;
                        Publisher_KindofEmployerIssue.OnEventName(this.myEventArgs_KindofEmployerIssue);
                        MessageBox.Show(string.Format("编入班级成功,班级编号为 {0},考编号为 {1}", this.str_IssueNo, myClass_Student.ExaminingNo));
                    }
                }
                else
                {
                    MessageBox.Show(string.Format("编入班级失败,{0}!", str_ReturnMessage));
                }
            }
            else
            {
                MessageBox.Show(string.Format("不存在班级编号为 {0} 的班级!", this.str_IssueNo));
            }
        }