Exemple #1
0
        private void toolStripButtonClassifyAdd_Click(object sender, EventArgs e)
        {
            FormTableClassify dlg = new FormTableClassify();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                dgvTableClassify.DataSource = CGlobalInstance.Instance.DbAdaHelper.GetTableClassify();
            }
            dlg.Dispose();
        }
Exemple #2
0
        private void toolStripButtonClassifyMod_Click(object sender, EventArgs e)
        {
            if (dgvTableClassify.CurrentRow != null)
            {
                int    TableClassifyID = Convert.ToInt32(dgvTableClassify.CurrentRow.Cells["ColumnTableClassifyID"].Value);
                string ClassifyName    = dgvTableClassify.CurrentRow.Cells["ColumnClassifyName"].Value.ToString();
                string AdmitNumber     = dgvTableClassify.CurrentRow.Cells["ColumnAdmitNumber"].Value.ToString();
                double SeatCost        = Convert.ToDouble(dgvTableClassify.CurrentRow.Cells["ColumnSeatCost"].Value);

                FormTableClassify dlg = new FormTableClassify();
                dlg.m_TableClassify.TableClassifyID = TableClassifyID;
                dlg.m_TableClassify.AdmitNumber     = AdmitNumber;
                dlg.m_TableClassify.ClassifyName    = ClassifyName;
                dlg.m_TableClassify.SeatCost        = SeatCost;
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    dgvTableClassify.DataSource = CGlobalInstance.Instance.DbAdaHelper.GetTableClassify();
                }
            }
        }