프로젝트

일반

사용자정보

개정판 498f0fc9

ID498f0fc993eab391483c935c80b75d2bbb6f0c56
상위 ffcc8124
하위 69db7b26, 224f1503

이지연이(가) 약 6년 전에 추가함

issue #771 Public Symbol Place, Register, Rename, Remove 추가

차이점 보기:

KCOM/Connected Services/ServiceDeepView/Reference.cs
27 27
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.MEMBER))]
28 28
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SIGN_INFO))]
29 29
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PRIVATE))]
30
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PUBLIC))]
30 31
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.CHECK_LIST_HISTORY))]
31 32
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.CHECK_LIST))]
32
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PUBLIC))]
33 33
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.TALK))]
34 34
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.FAVORITE_DOC))]
35 35
    public partial class StructuralObject : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
......
70 70
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.MEMBER))]
71 71
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SIGN_INFO))]
72 72
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PRIVATE))]
73
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PUBLIC))]
73 74
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.CHECK_LIST_HISTORY))]
74 75
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.CHECK_LIST))]
75
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PUBLIC))]
76 76
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.TALK))]
77 77
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.FAVORITE_DOC))]
78 78
    public partial class EntityObject : KCOM.ServiceDeepView.StructuralObject {
......
216 216
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SIGN_INFO))]
217 217
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.MEMBER>))]
218 218
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PRIVATE))]
219
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PUBLIC))]
219 220
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.CHECK_LIST_HISTORY))]
220 221
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.CHECK_LIST))]
221 222
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.CHECK_LIST>))]
222 223
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.CHECK_LIST_HISTORY>))]
223 224
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.SYMBOL_PRIVATE>))]
224 225
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.SYMBOL_PUBLIC>))]
225
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.SYMBOL_PUBLIC))]
226 226
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.DOCUMENT_ITEM>))]
227 227
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(KCOMDataModel.DataModel.TALK))]
228 228
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<KCOMDataModel.DataModel.TALK>))]
......
662 662
        
663 663
        bool EndSaveSymbol(System.IAsyncResult result);
664 664
        
665
        [System.ServiceModel.OperationContractAttribute(Action="urn:ServiceDeepView/AddPublicSymbol", ReplyAction="urn:ServiceDeepView/AddPublicSymbolResponse")]
666
        bool AddPublicSymbol(KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol);
667
        
668
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ServiceDeepView/AddPublicSymbol", ReplyAction="urn:ServiceDeepView/AddPublicSymbolResponse")]
669
        System.IAsyncResult BeginAddPublicSymbol(KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol, System.AsyncCallback callback, object asyncState);
670
        
671
        bool EndAddPublicSymbol(System.IAsyncResult result);
672
        
665 673
        [System.ServiceModel.OperationContractAttribute(Action="urn:ServiceDeepView/DeleteSymbol", ReplyAction="urn:ServiceDeepView/DeleteSymbolResponse")]
666
        bool DeleteSymbol(string symbol_id);
674
        bool DeleteSymbol(string symbol_id, int type);
667 675
        
668 676
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ServiceDeepView/DeleteSymbol", ReplyAction="urn:ServiceDeepView/DeleteSymbolResponse")]
669
        System.IAsyncResult BeginDeleteSymbol(string symbol_id, System.AsyncCallback callback, object asyncState);
677
        System.IAsyncResult BeginDeleteSymbol(string symbol_id, int type, System.AsyncCallback callback, object asyncState);
670 678
        
671 679
        bool EndDeleteSymbol(System.IAsyncResult result);
672 680
        
673 681
        [System.ServiceModel.OperationContractAttribute(Action="urn:ServiceDeepView/RenameSymbol", ReplyAction="urn:ServiceDeepView/RenameSymbolResponse")]
674
        bool RenameSymbol(string symbol_id, string name);
682
        bool RenameSymbol(string symbol_id, string name, int type);
675 683
        
676 684
        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ServiceDeepView/RenameSymbol", ReplyAction="urn:ServiceDeepView/RenameSymbolResponse")]
677
        System.IAsyncResult BeginRenameSymbol(string symbol_id, string name, System.AsyncCallback callback, object asyncState);
685
        System.IAsyncResult BeginRenameSymbol(string symbol_id, string name, int type, System.AsyncCallback callback, object asyncState);
678 686
        
679 687
        bool EndRenameSymbol(System.IAsyncResult result);
680 688
        
......
1313 1321
    
1314 1322
    [System.Diagnostics.DebuggerStepThroughAttribute()]
1315 1323
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
1324
    public partial class AddPublicSymbolCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
1325
        
1326
        private object[] results;
1327
        
1328
        public AddPublicSymbolCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : 
1329
                base(exception, cancelled, userState) {
1330
            this.results = results;
1331
        }
1332
        
1333
        public bool Result {
1334
            get {
1335
                base.RaiseExceptionIfNecessary();
1336
                return ((bool)(this.results[0]));
1337
            }
1338
        }
1339
    }
1340
    
1341
    [System.Diagnostics.DebuggerStepThroughAttribute()]
1342
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
1316 1343
    public partial class DeleteSymbolCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
1317 1344
        
1318 1345
        private object[] results;
......
2062 2089
        
2063 2090
        private System.Threading.SendOrPostCallback onSaveSymbolCompletedDelegate;
2064 2091
        
2092
        private BeginOperationDelegate onBeginAddPublicSymbolDelegate;
2093
        
2094
        private EndOperationDelegate onEndAddPublicSymbolDelegate;
2095
        
2096
        private System.Threading.SendOrPostCallback onAddPublicSymbolCompletedDelegate;
2097
        
2065 2098
        private BeginOperationDelegate onBeginDeleteSymbolDelegate;
2066 2099
        
2067 2100
        private EndOperationDelegate onEndDeleteSymbolDelegate;
......
2319 2352
        
2320 2353
        public event System.EventHandler<SaveSymbolCompletedEventArgs> SaveSymbolCompleted;
2321 2354
        
2355
        public event System.EventHandler<AddPublicSymbolCompletedEventArgs> AddPublicSymbolCompleted;
2356
        
2322 2357
        public event System.EventHandler<DeleteSymbolCompletedEventArgs> DeleteSymbolCompleted;
2323 2358
        
2324 2359
        public event System.EventHandler<RenameSymbolCompletedEventArgs> RenameSymbolCompleted;
......
3457 3492
                        symbol_private}, this.onEndSaveSymbolDelegate, this.onSaveSymbolCompletedDelegate, userState);
3458 3493
        }
3459 3494
        
3460
        public bool DeleteSymbol(string symbol_id) {
3461
            return base.Channel.DeleteSymbol(symbol_id);
3495
        public bool AddPublicSymbol(KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol) {
3496
            return base.Channel.AddPublicSymbol(symbol);
3497
        }
3498
        
3499
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3500
        public System.IAsyncResult BeginAddPublicSymbol(KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol, System.AsyncCallback callback, object asyncState) {
3501
            return base.Channel.BeginAddPublicSymbol(symbol, callback, asyncState);
3502
        }
3503
        
3504
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3505
        public bool EndAddPublicSymbol(System.IAsyncResult result) {
3506
            return base.Channel.EndAddPublicSymbol(result);
3507
        }
3508
        
3509
        private System.IAsyncResult OnBeginAddPublicSymbol(object[] inValues, System.AsyncCallback callback, object asyncState) {
3510
            KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol = ((KCOMDataModel.DataModel.SYMBOL_PUBLIC)(inValues[0]));
3511
            return this.BeginAddPublicSymbol(symbol, callback, asyncState);
3512
        }
3513
        
3514
        private object[] OnEndAddPublicSymbol(System.IAsyncResult result) {
3515
            bool retVal = this.EndAddPublicSymbol(result);
3516
            return new object[] {
3517
                    retVal};
3518
        }
3519
        
3520
        private void OnAddPublicSymbolCompleted(object state) {
3521
            if ((this.AddPublicSymbolCompleted != null)) {
3522
                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
3523
                this.AddPublicSymbolCompleted(this, new AddPublicSymbolCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
3524
            }
3525
        }
3526
        
3527
        public void AddPublicSymbolAsync(KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol) {
3528
            this.AddPublicSymbolAsync(symbol, null);
3529
        }
3530
        
3531
        public void AddPublicSymbolAsync(KCOMDataModel.DataModel.SYMBOL_PUBLIC symbol, object userState) {
3532
            if ((this.onBeginAddPublicSymbolDelegate == null)) {
3533
                this.onBeginAddPublicSymbolDelegate = new BeginOperationDelegate(this.OnBeginAddPublicSymbol);
3534
            }
3535
            if ((this.onEndAddPublicSymbolDelegate == null)) {
3536
                this.onEndAddPublicSymbolDelegate = new EndOperationDelegate(this.OnEndAddPublicSymbol);
3537
            }
3538
            if ((this.onAddPublicSymbolCompletedDelegate == null)) {
3539
                this.onAddPublicSymbolCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnAddPublicSymbolCompleted);
3540
            }
3541
            base.InvokeAsync(this.onBeginAddPublicSymbolDelegate, new object[] {
3542
                        symbol}, this.onEndAddPublicSymbolDelegate, this.onAddPublicSymbolCompletedDelegate, userState);
3543
        }
3544
        
3545
        public bool DeleteSymbol(string symbol_id, int type) {
3546
            return base.Channel.DeleteSymbol(symbol_id, type);
3462 3547
        }
3463 3548
        
3464 3549
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3465
        public System.IAsyncResult BeginDeleteSymbol(string symbol_id, System.AsyncCallback callback, object asyncState) {
3466
            return base.Channel.BeginDeleteSymbol(symbol_id, callback, asyncState);
3550
        public System.IAsyncResult BeginDeleteSymbol(string symbol_id, int type, System.AsyncCallback callback, object asyncState) {
3551
            return base.Channel.BeginDeleteSymbol(symbol_id, type, callback, asyncState);
3467 3552
        }
3468 3553
        
3469 3554
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
......
3473 3558
        
3474 3559
        private System.IAsyncResult OnBeginDeleteSymbol(object[] inValues, System.AsyncCallback callback, object asyncState) {
3475 3560
            string symbol_id = ((string)(inValues[0]));
3476
            return this.BeginDeleteSymbol(symbol_id, callback, asyncState);
3561
            int type = ((int)(inValues[1]));
3562
            return this.BeginDeleteSymbol(symbol_id, type, callback, asyncState);
3477 3563
        }
3478 3564
        
3479 3565
        private object[] OnEndDeleteSymbol(System.IAsyncResult result) {
......
3489 3575
            }
3490 3576
        }
3491 3577
        
3492
        public void DeleteSymbolAsync(string symbol_id) {
3493
            this.DeleteSymbolAsync(symbol_id, null);
3578
        public void DeleteSymbolAsync(string symbol_id, int type) {
3579
            this.DeleteSymbolAsync(symbol_id, type, null);
3494 3580
        }
3495 3581
        
3496
        public void DeleteSymbolAsync(string symbol_id, object userState) {
3582
        public void DeleteSymbolAsync(string symbol_id, int type, object userState) {
3497 3583
            if ((this.onBeginDeleteSymbolDelegate == null)) {
3498 3584
                this.onBeginDeleteSymbolDelegate = new BeginOperationDelegate(this.OnBeginDeleteSymbol);
3499 3585
            }
......
3504 3590
                this.onDeleteSymbolCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnDeleteSymbolCompleted);
3505 3591
            }
3506 3592
            base.InvokeAsync(this.onBeginDeleteSymbolDelegate, new object[] {
3507
                        symbol_id}, this.onEndDeleteSymbolDelegate, this.onDeleteSymbolCompletedDelegate, userState);
3593
                        symbol_id,
3594
                        type}, this.onEndDeleteSymbolDelegate, this.onDeleteSymbolCompletedDelegate, userState);
3508 3595
        }
3509 3596
        
3510
        public bool RenameSymbol(string symbol_id, string name) {
3511
            return base.Channel.RenameSymbol(symbol_id, name);
3597
        public bool RenameSymbol(string symbol_id, string name, int type) {
3598
            return base.Channel.RenameSymbol(symbol_id, name, type);
3512 3599
        }
3513 3600
        
3514 3601
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
3515
        public System.IAsyncResult BeginRenameSymbol(string symbol_id, string name, System.AsyncCallback callback, object asyncState) {
3516
            return base.Channel.BeginRenameSymbol(symbol_id, name, callback, asyncState);
3602
        public System.IAsyncResult BeginRenameSymbol(string symbol_id, string name, int type, System.AsyncCallback callback, object asyncState) {
3603
            return base.Channel.BeginRenameSymbol(symbol_id, name, type, callback, asyncState);
3517 3604
        }
3518 3605
        
3519 3606
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
......
3524 3611
        private System.IAsyncResult OnBeginRenameSymbol(object[] inValues, System.AsyncCallback callback, object asyncState) {
3525 3612
            string symbol_id = ((string)(inValues[0]));
3526 3613
            string name = ((string)(inValues[1]));
3527
            return this.BeginRenameSymbol(symbol_id, name, callback, asyncState);
3614
            int type = ((int)(inValues[2]));
3615
            return this.BeginRenameSymbol(symbol_id, name, type, callback, asyncState);
3528 3616
        }
3529 3617
        
3530 3618
        private object[] OnEndRenameSymbol(System.IAsyncResult result) {
......
3540 3628
            }
3541 3629
        }
3542 3630
        
3543
        public void RenameSymbolAsync(string symbol_id, string name) {
3544
            this.RenameSymbolAsync(symbol_id, name, null);
3631
        public void RenameSymbolAsync(string symbol_id, string name, int type) {
3632
            this.RenameSymbolAsync(symbol_id, name, type, null);
3545 3633
        }
3546 3634
        
3547
        public void RenameSymbolAsync(string symbol_id, string name, object userState) {
3635
        public void RenameSymbolAsync(string symbol_id, string name, int type, object userState) {
3548 3636
            if ((this.onBeginRenameSymbolDelegate == null)) {
3549 3637
                this.onBeginRenameSymbolDelegate = new BeginOperationDelegate(this.OnBeginRenameSymbol);
3550 3638
            }
......
3556 3644
            }
3557 3645
            base.InvokeAsync(this.onBeginRenameSymbolDelegate, new object[] {
3558 3646
                        symbol_id,
3559
                        name}, this.onEndRenameSymbolDelegate, this.onRenameSymbolCompletedDelegate, userState);
3647
                        name,
3648
                        type}, this.onEndRenameSymbolDelegate, this.onRenameSymbolCompletedDelegate, userState);
3560 3649
        }
3561 3650
        
3562 3651
        public bool AddCheckListHistory(string project_no, KCOMDataModel.DataModel.CHECK_LIST_HISTORY Check_History) {
KCOM/Controls/Symbol.xaml
110 110
                                <ColumnDefinition Width="3*"/>
111 111
                                <ColumnDefinition Width="3*"/>
112 112
                            </Grid.ColumnDefinitions>
113
                            <Button Content="Place" Click="Place_Symbol_Public" Grid.Column="0"  Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
114
                            <!--
113
                            <Button Content="Place" Click="Place_Symbol_Public" Grid.Column="0"  Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>                            
115 114
                            <Button Content="Register" Grid.Column="1" Click="Create_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
116
                            <Button Content="Rename" Grid.Column="2" Click="Rename_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
117
                            <Button Content="Remove" Grid.Column="3" Click="Remove_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5"  Background="#3d3d3d" Foreground="White"/>-->
115
                            <Button Content="Rename" Grid.Column="2" Click="Rename_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
116
                            <Button Content="Remove" Grid.Column="3" Click="Remove_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5"  Background="#3d3d3d" Foreground="White"/>
118 117
                        </Grid>
119 118
                        <Grid Margin="0,10">
120 119
                            <Grid.ColumnDefinitions>
KCOM/Controls/Symbol.xaml.cs
201 201

  
202 202
        #region Event
203 203

  
204
        #region Symbol Add Event
204
        #region Private Symbol Add Event
205 205
        private void Create_Symbol(object sender, RoutedEventArgs e)
206 206
        {
207 207
            MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn();
......
232 232
                }
233 233
                DialogParameters parameters = new DialogParameters()
234 234
                {
235
                    Closed = (obj, args) => this.MarkupNamePromptClose(MarkupData, args),
235
                    Closed = (obj, args) => this.MarkupNamePromptClose(MarkupData, args), 
236 236
                    DefaultPromptResultValue = "Custom State",
237 237
                    Content = "Name :",
238 238
                    Header = "Insert Custom Symbol Name",
......
262 262

  
263 263
                kr.co.devdoftech.cloud.FileUpload fileUploader = new kr.co.devdoftech.cloud.FileUpload();
264 264
                filename = fileUploader.Run(App.ViewInfo.ProjectNO, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu._DocItem.DOCUMENT_NO, App.ViewInfo.UserID, Save.shortGuid() + ".png", Img_byte);
265

  
266
                save.SymbolSave(args.PromptResult, filename, data);
265
                
266
                if(RadTab.SelectedIndex == 0)
267
                {
268
                    save.SymbolSave(args.PromptResult, filename, data);
269
                }
270
                else
271
                {
272
                    save.SymbolSave_Public(args.PromptResult, filename, data, Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.userData.DEPARTMENT);
273
                }                
267 274

  
268 275
                DataBind();
269 276
            }
270 277
        }
271 278
        #endregion
272 279

  
273
        #region Symbol Delete Event
280
        #region Private Symbol Delete Event
274 281
        private void Remove_Symbol(object sender, RoutedEventArgs e)
275 282
        {
276 283
            if (lstSymbolPrivate.SelectedItem == null)
......
282 289

  
283 290
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolCompleted += BaseClient_DeleteSymbolCompleted;           
284 291
            Logger.sendReqLog("DeleteSymbolAsync: ", delItem_ID, 1);
285
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolAsync(delItem_ID);
286
            
292
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolAsync(delItem_ID, RadTab.SelectedIndex);            
293
        }
294
        #endregion
295
        #region Public Symbol Delete Event
296
        private void Remove_Symbol_Public(object sender, RoutedEventArgs e)
297
        {
298
            if (lstSymbolPublic.SelectedItem == null)
299
            {
300
                DialogMessage_Alert("Please Select Symbol", "Alert");
301
                return;
302
            }
303
            string delItem_ID = (lstSymbolPublic.SelectedItem as Symbol_Custom).ID;
304

  
305
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolCompleted += BaseClient_DeleteSymbolCompleted;
306
            Logger.sendReqLog("DeleteSymbolAsync: ", delItem_ID, 1);
307
            Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.DeleteSymbolAsync(delItem_ID, RadTab.SelectedIndex);
287 308
        }
288 309

  
289 310
        private void BaseClient_DeleteSymbolCompleted(object sender, ServiceDeepView.DeleteSymbolCompletedEventArgs e)
......
358 379
        }
359 380
        #endregion
360 381

  
361
        #region Symbol Rename Event
382
        #region Private Symbol Rename Event
362 383
        private void Rename_Symbol(object sender, RoutedEventArgs e)
363 384
        {
364 385
            if (lstSymbolPrivate.SelectedItem == null)
......
382 403
        }
383 404
        #endregion
384 405

  
406
        #region Public Symbol Rename Event
407
        private void Rename_Symbol_Public(object sender, RoutedEventArgs e)
408
        {
409
            if (lstSymbolPublic.SelectedItem == null)
410
            {
411
                DialogMessage_Alert("Please Select Symbol", "Alert");
412
                return;
413
            }
414

  
415
            DialogParameters parameters = new DialogParameters()
416
            {
417
                Closed = (obj, args) => this.MarkupReNamePromptClose("", args),
418
                //DefaultPromptResultValue = "Custom State",
419
                DefaultPromptResultValue = (lstSymbolPublic.SelectedItem as Symbol_Custom).Name,
420
                Content = "Name :",
421
                Header = "Update Custom Symbol Name",
422
                Theme = new VisualStudio2013Theme(),
423
                ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 },
424
            };
425
            RadWindow.Prompt(parameters);
426

  
427
        }
428
        #endregion
385 429
        #region Symbol Rename Close Event
386 430
        private void MarkupReNamePromptClose(string data, WindowClosedEventArgs args)
387 431
        {
388 432
            if (args.DialogResult != null && args.DialogResult.Value)
389 433
            {
390
                string _id = (lstSymbolPrivate.SelectedItem as Symbol_Custom).ID;
391
                string _name = args.PromptResult;
392
                
393
                Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolCompleted += BaseClient_RenameSymbolCompleted;
394

  
395
                Logger.sendReqLog("RenameSymbolAsync: ", _id + "," + _name, 1);
396
                Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolAsync(_id, _name);                
434
                if(RadTab.SelectedIndex == 0)
435
                {
436
                    string _id = (lstSymbolPrivate.SelectedItem as Symbol_Custom).ID;
437
                    string _name = args.PromptResult;
438
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolCompleted += BaseClient_RenameSymbolCompleted;
439
                    Logger.sendReqLog("RenameSymbolAsync: ", _id + "," + _name, 1);
440
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolAsync(_id, _name, RadTab.SelectedIndex);
441
                }
442
                else
443
                {
444
                    string _id = (lstSymbolPublic.SelectedItem as Symbol_Custom).ID;
445
                    string _name = args.PromptResult;
446
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolCompleted += BaseClient_RenameSymbolCompleted;
447
                    Logger.sendReqLog("RenameSymbolAsync: ", _id + "," + _name, 1);
448
                    Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.RenameSymbolAsync(_id, _name, RadTab.SelectedIndex);
449
                }                        
397 450
            }
398 451
        }
399 452

  
KCOM/Events/Save.cs
148 148
                throw;
149 149
            }
150 150
        }
151
        public void SymbolSave_Public(string Name, string Url, string Data, string Department)
152
        {
153
            try
154
            {
155
                SYMBOL_PUBLIC symbol_public = new SYMBOL_PUBLIC
156
                {
157
                    ID = shortGuid(),
158
                    DEPARTMENT = Department,
159
                    NAME = Name,
160
                    IMAGE_URL = Url,
161
                    DATA = Data
162
                };
151 163

  
164
                Logger.sendReqLog("AddPublicSymbol: ", symbol_public.ID + "," + symbol_public.DEPARTMENT + "," + symbol_public.NAME + "," + symbol_public.IMAGE_URL + "," + symbol_public.DATA, 1);
165
                Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.AddPublicSymbol(symbol_public);
166
            }
167
            catch (Exception)
168
            {
169
                throw;
170
            }
171
        }
152 172
        public void PageAngleSave(string project_no, List<DOCPAGE> _mldocpage)
153 173
        {
154 174
            try
KCOM_API/ServiceDeepView.svc.cs
1072 1072
            }
1073 1073
            return true;
1074 1074
        }
1075

  
1076 1075
        [OperationContract]
1077
        public bool DeleteSymbol(string symbol_id)
1076
        public bool AddPublicSymbol(SYMBOL_PUBLIC symbol)
1077
        {
1078
            try
1079
            {
1080
                using (KCOMDataModel.DataModel.KCOMEntities uc = new KCOMDataModel.DataModel.KCOMEntities(KCOMDataModel.Common.ConnectStringBuilder.KCOMConnectionString().ToString()))
1081
                {
1082
                    uc.AddToSYMBOL_PUBLIC(symbol);
1083
                    uc.SaveChanges();
1084
                }
1085
            }
1086
            catch (Exception)
1087
            {
1088
                return false;
1089
            }
1090
            return true;
1091
        }
1092
        [OperationContract]
1093
        public bool DeleteSymbol(string symbol_id, int type)
1078 1094
        {
1079 1095
            try
1080 1096
            {
1081 1097
                using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
1082 1098
                {
1083
                    string delItem_ID = symbol_id;
1084
                    var delitem = Entity.SYMBOL_PRIVATE.Where(data => data.ID == delItem_ID).FirstOrDefault();
1085
                    Entity.SYMBOL_PRIVATE.DeleteObject(delitem);
1086
                    Entity.SaveChanges();
1099
                    if (type == 0)
1100
                    {
1101
                        string delItem_ID = symbol_id;
1102
                        var delitem = Entity.SYMBOL_PRIVATE.Where(data => data.ID == delItem_ID).FirstOrDefault();
1103
                        Entity.SYMBOL_PRIVATE.DeleteObject(delitem);
1104
                        Entity.SaveChanges();
1105
                    }
1106
                    else
1107
                    {
1108
                        string delItem_ID = symbol_id;
1109
                        var delitem = Entity.SYMBOL_PUBLIC.Where(data => data.ID == delItem_ID).FirstOrDefault();
1110
                        Entity.SYMBOL_PUBLIC.DeleteObject(delitem);
1111
                        Entity.SaveChanges();
1112
                    }
1087 1113
                }
1088 1114
            }
1089 1115
            catch(Exception)
......
1094 1120
        }
1095 1121

  
1096 1122
        [OperationContract]
1097
        public bool RenameSymbol(string symbol_id, string name)
1123
        public bool RenameSymbol(string symbol_id, string name, int type)
1098 1124
        {
1099 1125
            try
1100 1126
            {
1101 1127
                using (KCOMEntities Entity = new KCOMEntities(ConnectStringBuilder.KCOMConnectionString().ToString()))
1102 1128
                {
1103
                    var UpdateItem = Entity.SYMBOL_PRIVATE.Where(info => info.ID == symbol_id).FirstOrDefault();
1104
                    UpdateItem.NAME = name;
1105
                    Entity.SaveChanges();
1129
                    if (type == 0)
1130
                    {
1131
                        var UpdateItem = Entity.SYMBOL_PRIVATE.Where(info => info.ID == symbol_id).FirstOrDefault();
1132
                        UpdateItem.NAME = name;
1133
                        Entity.SaveChanges();
1134
                    }
1135
                    else
1136
                    {
1137
                        var UpdateItem = Entity.SYMBOL_PUBLIC.Where(info => info.ID == symbol_id).FirstOrDefault();
1138
                        UpdateItem.NAME = name;
1139
                        Entity.SaveChanges();
1140
                    }
1106 1141
                }
1107 1142
            }
1108 1143
            catch (Exception)

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)