예제 #1
0
        private void btnSEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmService frm = new frmService();

            frm.Execute(Convert.ToInt32(SMView.GetFocusedRowCellValue("ServiceId")));
            PopulateGrid();
        }
예제 #2
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (reply == DialogResult.Yes)
            {
                bool status = false;
                status = oService.DeleteService(Convert.ToInt32(SMView.GetFocusedRowCellValue("ServiceId")));
                if (status == false)
                {
                    MessageBox.Show("Already Used, Do Not Delete", "Vendor", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                PopulateGrid();
            }
        }