示例#1
0
        private void bntConfirm_Click(object sender, EventArgs e)
        {
            if (tBxJobName.Text != "")
            {
                currentJob.JobName     = tBxJobName.Text;
                currentJob.ReceiptDate = dTPReceiptDate.Value;
                if (!checkBox1.Checked)
                {
                    currentJob.DismissDate = dTPDissmissDate.Value;
                }
                else
                {
                    currentJob.DismissDate = DateTime.MinValue;
                }
                currentJob.DismissReason = tBxDismissReason.Text;
                if (currentJob.Id == 0)
                {
                    QueryDb.InsertRecentJob(currentJob);
                }
                else
                {
                    QueryDb.UpdateRecentJob(currentJob);
                }

                updateDGW(currentJob.ProfileId);
                this.Close();
            }
            else
            {
                MessageBox.Show("Введите название места работы.");
            }
        }