Exemple #1
0
        private void XoaXe()
        {
            grdXe.SelectionMode = Janus.Windows.GridEX.SelectionMode.SingleSelection;
            if (grdXe.SelectedItems.Count > 0)
            {
                GridEXRow row               = ((GridEXSelectedItem)grdXe.SelectedItems[0]).GetRow();
                Xe        objXe             = (Xe)((GridEXSelectedItem)grdXe.SelectedItems[0]).GetRow().DataRow;
                MessageBox.MessageBoxBA msg = new Taxi.MessageBox.MessageBoxBA();

                if (msg.Show(this, "Bạn có xóa xe " + objXe.SoHieuXe + " không ?", "Xóa nhân viên", Taxi.MessageBox.MessageBoxButtonsBA.OKCancel, Taxi.MessageBox.MessageBoxIconBA.Question).ToString() == DialogResult.OK.ToString())
                {
                    if (!objXe.Delete(objXe.SoHieuXe))
                    {
                        new MessageBox.MessageBoxBA().Show("Lỗi xóa thông tin xe");
                        return;
                    }
                    else
                    {
                        //Load lai grid
                        LoadListXe();
                    }
                }
            }
        }