public static void PostAd(string title, string content, string location, SaServicePrivate.AdType type) { using (var client = ServiceHelper.GetServiceClientLoggedIn()) { try { client.PostAd(title, content, location, type); } catch (Exception ex) { MessageBox.Show("Could not post ad.\nTechnical details\n\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } ViewController.UpdateAds(); }
public static AdType Convert(this SaServicePrivate.AdType type) { return((AdType)type); }