void DelelteData() { if (dgDisplayData.SelectedRows.Count > 0) { if (Datalayer.ShowQuestMsg(Datalayer.sMessageConfirmation)) { try { int ID = 0; int.TryParse(dgDisplayData.CurrentRow.Cells["T007_SALEID"].Value.ToString(), out ID); int?Iout = 0; MyDa = new MyDabaseDataContext(Properties.Settings.Default.Style_King_Dev); MyDa.USP_VP_DELETE_SALEITEM(ID, ref Iout); MyDa.USP_VP_DELETE_SALE(ID, ref Iout); if (Iout > 0) { Datalayer.DeleteMessageBox("Sale Details"); PopualteData(); } else { Datalayer.DosenotDeleteMessageBox("Sale Details"); } } catch (Exception) { Datalayer.InformationMessageBox(Datalayer.sMessageForainKey); return; } } } else { Datalayer.InformationMessageBox(Datalayer.sMeessgeSelection); } }