프로젝트

일반

사용자정보

개정판 e9ed6b7b

IDe9ed6b7bc6a61f1954bb8ddf3d8adc759e19ded0
상위 345bd773
하위 a8811318, f312a159

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

dev issue #1227 : mapping 화면 및 Default symbol modeling

Change-Id: I21818ac2905647092cf2dafc46a8e7663346512c

차이점 보기:

DTI_PID/APIDConverter/DB/Project_DB.cs
299 299

  
300 300
            return dt;
301 301
        }
302

  
303

  
304
        #region AVEVA
305
        private static string GetAvevaConnectionString()
306
        {
307
            string strConn = string.Empty;
308
            if (Utilities.strSQLWinAuthentication.ToUpper() == "YES")
309
            {
310
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Integrated Security=SSPI;Initial Catalog={0};", Utilities.strSQLDatabaseName);
311
            }
312
            else if (Utilities.strSQLWinAuthentication.ToUpper() == "NO")
313
            {
314
                string strAccessString = "User ID=" + Utilities.strSQLUserName + ";Password=" + Utilities.strSQLPassword;
315
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Initial Catalog=" + Utilities.strSQLDatabaseName + ";" + strAccessString);
316
            }
317

  
318
            return strConn;
319
        }
320

  
321
        private static string GetAvevaConnectionString_Reports()
322
        {
323
            string strConn = string.Empty;
324
            if (Utilities.strSQLWinAuthentication.ToUpper() == "YES")
325
            {
326
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Integrated Security=SSPI;Initial Catalog={0};", Utilities.strSQLReportsDatabaseName);
327
            }
328
            else if (Utilities.strSQLWinAuthentication.ToUpper() == "NO")
329
            {
330
                string strAccessString = "User ID=" + Utilities.strSQLUserName + ";Password=" + Utilities.strSQLPassword;
331
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Initial Catalog=" + Utilities.strSQLReportsDatabaseName + ";" + strAccessString);
332
            }
333

  
334
            return strConn;
335
        }
336

  
337
        private static string GetAvevaConnectionString_Admin()
338
        {
339
            string strConn = string.Empty;
340
            if (Utilities.strSQLWinAuthentication.ToUpper() == "YES")
341
            {
342
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Integrated Security=SSPI;Initial Catalog={0};", Utilities.strSQLAdminDatabaseName);
343
            }
344
            else if (Utilities.strSQLWinAuthentication.ToUpper() == "NO")
345
            {
346
                string strAccessString = "User ID=" + Utilities.strSQLUserName + ";Password=" + Utilities.strSQLPassword;
347
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Initial Catalog=" + Utilities.strSQLAdminDatabaseName + ";" + strAccessString);
348
            }
349

  
350
            return strConn;
351
        }
352

  
353
        public static DataTable SelectSymbolTable()
354
        {
355
            DataTable dt = new DataTable();
356

  
357
            using (SqlConnection connection = new SqlConnection())
358
            {
359
                connection.ConnectionString = GetAvevaConnectionString_Admin();
360
                connection.Open();
361
                using (SqlCommand cmd = connection.CreateCommand())
362
                {
363
                    cmd.CommandText = string.Format("SELECT * FROM {0}", "SYMBOLS");
364
                    using (SqlDataReader dr = cmd.ExecuteReader())
365
                        dt.Load(dr);
366
                }
367
                connection.Close();
368
            }
369

  
370
            return dt;
371
        }
372

  
373
        #endregion
374

  
302 375
    }
303 376
}
DTI_PID/APIDConverter/Form/MappingForm.Designer.cs
29 29
        private void InitializeComponent()
30 30
        {
31 31
            this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl();
32
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
33
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
32 34
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
35
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
36
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
33 37
            this.SuspendLayout();
34 38
            // 
35 39
            // ribbonControl
......
47 51
            this.ribbonControl.Size = new System.Drawing.Size(808, 32);
48 52
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
49 53
            // 
54
            // layoutControl1
55
            // 
56
            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
57
            this.layoutControl1.Location = new System.Drawing.Point(0, 32);
58
            this.layoutControl1.Name = "layoutControl1";
59
            this.layoutControl1.Root = this.Root;
60
            this.layoutControl1.Size = new System.Drawing.Size(808, 497);
61
            this.layoutControl1.TabIndex = 1;
62
            this.layoutControl1.Text = "layoutControl1";
63
            // 
64
            // Root
65
            // 
66
            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
67
            this.Root.GroupBordersVisible = false;
68
            this.Root.Name = "Root";
69
            this.Root.Size = new System.Drawing.Size(808, 497);
70
            this.Root.TextVisible = false;
71
            // 
50 72
            // MappingForm
51 73
            // 
52 74
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
53 75
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
54 76
            this.ClientSize = new System.Drawing.Size(808, 529);
77
            this.Controls.Add(this.layoutControl1);
55 78
            this.Controls.Add(this.ribbonControl);
56 79
            this.Name = "MappingForm";
57 80
            this.Ribbon = this.ribbonControl;
......
59 82
            this.Text = "Item Mapping";
60 83
            this.Load += new System.EventHandler(this.MappingForm_Load);
61 84
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit();
85
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
86
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
62 87
            this.ResumeLayout(false);
63 88
            this.PerformLayout();
64 89

  
......
67 92
        #endregion
68 93

  
69 94
        private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl;
95
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
96
        private DevExpress.XtraLayout.LayoutControlGroup Root;
70 97
    }
71 98
}
DTI_PID/APIDConverter/PIDCustomization.cs
341 341
            return strConn;
342 342
        }
343 343

  
344
        private string GetConnectionString_Admin()
345
        {
346
            string strConn = string.Empty;
347
            if (Utilities.strSQLWinAuthentication.ToUpper() == "YES")
348
            {
349
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Integrated Security=SSPI;Initial Catalog={0};", Utilities.strSQLAdminDatabaseName);
350
            }
351
            else if (Utilities.strSQLWinAuthentication.ToUpper() == "NO")
352
            {
353
                string strAccessString = "User ID=" + Utilities.strSQLUserName + ";Password=" + Utilities.strSQLPassword;
354
                strConn = String.Format("Data Source=" + Utilities.strSQLServerName + ";Initial Catalog=" + Utilities.strSQLAdminDatabaseName + ";" + strAccessString);
355
            }
356

  
357
            return strConn;
358
        }
359

  
344 360
        private string GetDrawingSavePath()
345 361
        {
346 362
            return System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);

내보내기 Unified diff

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