Пример #1
0
 /// <summary>
 /// 创建一个资源
 /// </summary>
 /// <param name="resourceName"></param>
 /// <param name="resourceType"></param>
 /// <param name="resourcePath"></param>
 private void CreateResourceQuery(string resourceName, string resourceType, string resourcePath)
 {
     if (GetDataByResourcePath(resourcePath) == null)
     {
         ResrcTableAdapter.Insert(resourceName, resourceType, resourcePath);
         ResrcTableAdapter.Update(MoonDataset.Resources);
         MoonDataset.Resources.AcceptChanges();
     }
 }
Пример #2
0
 /// <summary>
 /// 删除一个资源
 /// </summary>
 /// <param name="resourceId"></param>
 private void DeleteResourceQuery(int resourceId)
 {
     ResrcTableAdapter.Delete(resourceId);
     ResrcTableAdapter.Update(MoonDataset.Resources);
     MoonDataset.Resources.AcceptChanges();
 }