public static void DeleteCustomUrl(Guid customUrlId) { using (CustomUrlTableAdapter adapter = new CustomUrlTableAdapter()) { using (MasterDataSet.CustomUrlDataTable table = adapter.GetCustomUrl(customUrlId)) { if (table.Count > 0) { MasterDataSet.CustomUrlRow row = table[0]; if (row.IsInstanceIdNull()) { RemoveOrganizationCustomUrlFromCache(row.OrganizationId); } else { RemoveInstanceCustomUrlFromCache(row.InstanceId); } row.Delete(); adapter.Update(table); } } } }
public static MasterDataSet.CustomUrlRow GetCustomUrl(Guid customUrlId) { using (CustomUrlTableAdapter adapter = new CustomUrlTableAdapter()) { using (MasterDataSet.CustomUrlDataTable table = adapter.GetCustomUrl(customUrlId)) { return((table.Count > 0) ? table[0] : null); } } }