개정판 6c781c0c
issue #573 : Direct DB Connection Modify
Client Method Modify
KCOM/MainWindow.xaml.cs | ||
---|---|---|
48 | 48 |
}; |
49 | 49 |
Telerik.Windows.Controls.RadWindow.Alert(parameters); |
50 | 50 |
} |
51 |
|
|
52 |
public void test() |
|
53 |
{ |
|
54 |
using (CIEntities Entity = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString())) |
|
55 |
{ |
|
56 |
string key = "NXVjTcWcku8d54537cb3ed95a"; |
|
57 |
|
|
58 |
MARKUP_INFO instance = Entity.MARKUP_INFO.Where(root => root.ID == key).FirstOrDefault(); |
|
59 |
|
|
60 |
if (instance == null) |
|
61 |
{ |
|
62 |
return; |
|
63 |
} |
|
64 |
MARKUP_INFO_VERSION version = instance.MARKUP_INFO_VERSION.FirstOrDefault(); |
|
65 |
|
|
66 |
|
|
67 |
version.MARKUP_DATA.ToList().ForEach(data => |
|
68 |
{ |
|
69 |
Entity.MARKUP_DATA.DeleteObject(data); |
|
70 |
Entity.SaveChanges(); |
|
71 |
}); |
|
72 |
|
|
73 |
Entity.MARKUP_INFO_VERSION.DeleteObject(version); |
|
74 |
Entity.SaveChanges(); |
|
75 |
|
|
76 |
Entity.MARKUP_INFO.DeleteObject(instance); |
|
77 |
Entity.SaveChanges(); |
|
78 |
|
|
79 |
} |
|
80 |
} |
|
51 |
|
|
81 | 52 |
private void MainWindow_Loaded(object sender, RoutedEventArgs e) |
82 | 53 |
{ |
83 | 54 |
double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth; |
... | ... | |
89 | 60 |
this.Top = (screenHeight / 2) - (windowHeight / 2); |
90 | 61 |
|
91 | 62 |
|
92 |
//test(); |
|
93 | 63 |
ViewerDataModel.Instance.SystemMain = this; |
94 | 64 |
|
95 | 65 |
if (!App.ParameterMode) |
내보내기 Unified diff