Example #1
0
        private void btn_capphat_Click(object sender, EventArgs e)
        {
            if (gv_bode.GetFocusedRowCellValue("MaBoDe") == null)
            {
                return; // no ma no de
            }
            string maBoDe   = gv_bode.GetFocusedRowCellValue("MaBoDe").ToString();
            bool   isSucces = xl.CapPhat(maBoDe);

            if (isSucces)
            {
                loadct(gv_bode.GetFocusedRowCellValue("MaBoDe").ToString());
                btn_capphat.Enabled = false;
                btn_xoact.Enabled   = true;
            }
            else
            {
                MessageBox.Show("Cấp phát thất bại");
            }
        }