示例#1
0
        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);
                    }
                }
            }
        }
示例#2
0
 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);
         }
     }
 }