프로젝트

일반

사용자정보

개정판 498f0fc9

ID498f0fc993eab391483c935c80b75d2bbb6f0c56
상위 ffcc8124
하위 69db7b26, 224f1503

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

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

차이점 보기:

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)