Esempio n. 1
0
        private void msds_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            fr_CTHDN fr = new fr_CTHDN();

            fr.SOHDN = txtma.Text;
            this.Close();
            fr.Show();
        }
Esempio n. 2
0
        private void btluu_Click(object sender, EventArgs e)
        {
            if (themmoi == true)
            {
                try
                {
                    ck.SOHDN    = txtma.Text;
                    ck.MANV     = cbnv.Text;
                    ck.NGAYNHAP = txtngay.Text;
                    ck.MANCC    = cbncc.Text;

                    thucthi.themoihdn(ck);
                    locktext();
                    hienthi();
                    MessageBox.Show("Đã Lưu Thành Công", "Chú Ý", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    fr_CTHDN fr = new fr_CTHDN();
                    fr.SOHDN = txtma.Text;
                    this.Close();
                    fr.Show();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Chú Ý", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                try
                {
                    ck.SOHDN    = txtma.Text;
                    ck.MANV     = cbnv.Text;
                    ck.NGAYNHAP = txtngay.Text;
                    ck.MANCC    = cbncc.Text;
                    thucthi.suahdn(ck);
                    MessageBox.Show("Đã Sửa Thành Công Thành Công", "Chú Ý", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    fr_CTHDN fr = new fr_CTHDN();
                    fr.SOHDN = txtma.Text;
                    this.Hide();
                    fr.ShowDialog();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "Chú Ý", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            txtma.Enabled = true;
            locktext();
            hienthi();
        }