Example #1
0
        private void Add(object sender, EventArgs e)
        {
            if (((MainForm)this.MdiParent).ActiveMdiChild == this)
            {
                EmployeeVO         employeeVO = this.GetEmployee();
                WorkOrderPopupForm frm        = new WorkOrderPopupForm(employeeVO);

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }
        }
Example #2
0
        private void dataGridViewControl1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            DataGridViewRow dgvr = dataGridViewControl1.Rows[e.RowIndex];

            if ((Convert.ToDateTime(dgvr.Cells["WORK_DATE"].Value) - DateTime.Now).Days > 0)
            {
                EmployeeVO         employeeVO = this.GetEmployee();
                WorkOrderPopupForm frm        = new WorkOrderPopupForm(employeeVO, dgvr.Cells["WORK_ORDER_NO"].Value.ToInt());

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }
        }