프로젝트

일반

사용자정보

개정판 b8bd98aa

IDb8bd98aa8f4e79801a9c7d0069d6ea9871e4e5f8
상위 c2fef4ca
하위 661893d7, 289e9573

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #000 : label readerLine 폼 개발

Change-Id: I837241e93ce08c6f4f75a7abe37ac1917c6eb711

차이점 보기:

DTI_PID/BaseModel/Project_DB.cs
15 15
        const string SPPID_SYMBOL_MAPPING_TABLE = "T_SPPID_SYMBOL_MAPPING";
16 16
        const string SPPID_ATTRIBUTE_MAPPING_TABLE = "T_SPPID_ATTRIBUTE_MAPPING";
17 17
        const string SPPID_ETC_SETTING_TABLE = "T_SPPID_ETC_SETTING_TABLE";
18
        const string SPPID_LABEL_LOCATION_TABLE = "T_SPPID_LABEL_LOCATION";
18
        const string SPPID_LABEL_INFO_TABLE = "T_SPPID_LABEL_INFO";
19 19

  
20 20
        const string LineProperties_TABLE = "LineProperties";
21 21
        const string LineTypes_TABLE = "LineTypes";
......
206 206
                        cmd.CommandText = string.Format("CREATE TABLE {0} (UID TEXT PRIMARY KEY, SPPID_ATTRIBUTE TEXT)", SPPID_ATTRIBUTE_MAPPING_TABLE);
207 207
                        cmd.ExecuteNonQuery();
208 208
                    }
209
                    if (dt.Select(string.Format("NAME = '{0}'", SPPID_LABEL_LOCATION_TABLE)).Length == 0)
209
                    if (dt.Select(string.Format("NAME = '{0}'", SPPID_LABEL_INFO_TABLE)).Length == 0)
210 210
                    {
211
                        cmd.CommandText = string.Format("CREATE TABLE {0} (UID TEXT PRIMARY KEY, LOCATION INT DEFAULT 0)", SPPID_LABEL_LOCATION_TABLE);
211
                        cmd.CommandText = string.Format("CREATE TABLE {0} (UID TEXT PRIMARY KEY, LOCATION INT DEFAULT 0, LEADERLINE BOOLEAN)", SPPID_LABEL_INFO_TABLE);
212 212
                        cmd.ExecuteNonQuery();
213 213
                    }
214 214
                }
......
413 413
                    using (SQLiteCommand cmd = connection.CreateCommand())
414 414
                    {
415 415
                        cmd.CommandText = string.Format(@"
416
                            SELECT sa.UID, sa.DisplayAttribute, st.TYPE, spa.SPPID_ATTRIBUTE, sp.SPPID_SYMBOL_PATH, spl.LOCATION 
416
                            SELECT sa.UID, sa.DisplayAttribute, st.TYPE, spa.SPPID_ATTRIBUTE, sp.SPPID_SYMBOL_PATH, spl.LOCATION, spl.LEADERLINE 
417 417
                            FROM {1} as sa, {0} as st 
418 418
                                 LEFT OUTER JOIN {2} as sp 
419 419
                                      ON sa.UID = SP.UID 
......
421 421
                                     ON sa.UID = spa.UID
422 422
                                LEFT OUTER JOIN {4} as spl 
423 423
                                     ON sa.UID = spl.UID
424
                            WHERE sa.SymbolType_UID = st.UID;", SymbolType_TABLE, SymbolAttribute_TABLE, SPPID_SYMBOL_MAPPING_TABLE, SPPID_ATTRIBUTE_MAPPING_TABLE, SPPID_LABEL_LOCATION_TABLE);
424
                            WHERE sa.SymbolType_UID = st.UID;", SymbolType_TABLE, SymbolAttribute_TABLE, SPPID_SYMBOL_MAPPING_TABLE, SPPID_ATTRIBUTE_MAPPING_TABLE, SPPID_LABEL_INFO_TABLE);
425 425
                        using (SQLiteDataReader dr = cmd.ExecuteReader())
426 426
                            dt.Load(dr);
427 427
                    }
......
540 540
            return true;
541 541
        }
542 542

  
543
        public static bool InsertLocationMapping(List<Tuple<string, int>> datas)
543
        public static bool InsertLocationMapping(List<Tuple<string, int, bool>> datas)
544 544
        {
545 545
            Project_Info projectInfo = Project_Info.GetInstance();
546 546
            using (SQLiteConnection connection = new SQLiteConnection(string.Format(CultureInfo.CurrentCulture, "Data Source = {0}", projectInfo.DBFilePath)))
......
557 557
                                foreach (var item in datas)
558 558
                                {
559 559
                                    cmd.Parameters.Clear();
560
                                    cmd.CommandText = string.Format("INSERT OR REPLACE INTO {0} (UID, LOCATION) VALUES (@UID, @LOCATION)", SPPID_LABEL_LOCATION_TABLE);
560
                                    cmd.CommandText = string.Format("INSERT OR REPLACE INTO {0} (UID, LOCATION, LEADERLINE) VALUES (@UID, @LOCATION, @LEADERLINE)", SPPID_LABEL_INFO_TABLE);
561 561
                                    cmd.Parameters.AddWithValue("@UID", item.Item1);
562 562
                                    cmd.Parameters.AddWithValue("@LOCATION", item.Item2);
563
                                    cmd.Parameters.AddWithValue("@LEADERLINE", item.Item3);
563 564
                                    cmd.ExecuteNonQuery();
564 565
                                }
565 566
                            }

내보내기 Unified diff

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