private Control GetForm() { Control parent = Parent; while (parent != null) { if (parent is Form) { break; } parent = parent.Parent; } try { if (parent != null) { return(parent); } } catch (Exception ex) { BsMessageBox.ShowError(ex.ToString()); } return(null); }
private void BsStandartToolStrip1_OkSaveButtonClicked(object sender, EventArgs e) { if (advertisementList.Count(a => a.PageId == 1) != 1) { BsMessageBox.ShowError("Bir kapak reklamı girin"); return; } if (advertisementList.Count(a => a.PageId == 2) != 1) { BsMessageBox.ShowError("Bir kapak içi reklamı girin"); return; } if (advertisementList.Count(a => a.PageId == 3) != 1) { BsMessageBox.ShowError("Bir arka kapak reklamı girin"); return; } OAdvertisementSave save = new OAdvertisementSave(advertisementList, selectedDateId); BsNewResult result = save.Execute(); BsMessageBox.Show(result); GetFormReady(); }