Пример #1
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int  iFacId = Convert.ToInt32(CommFun.IsNullCheck(grdViewFac.GetFocusedRowCellValue("FacingId"), CommFun.datatypes.vartypenumeric));
            bool bAns   = false;

            bAns = UnitDirBL.FacingFound(iFacId);
            if (bAns == true)
            {
                MessageBox.Show("Do not Delete, Facing Already Used"); return;
            }

            DialogResult result1 = MessageBox.Show("Are you sure", "Facing Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result1 == DialogResult.Yes)
            {
                UnitDirBL.DeleteFacing(m_iCCId, iFacId);
                grdViewFac.DeleteSelectedRows();
            }
        }