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