소스 검색

修改保存GRID内容时出现的绑定变量BUG

章政 7 년 전
부모
커밋
ba46e22bd1
2개의 변경된 파일11개의 추가작업 그리고 11개의 파일을 삭제
  1. 9 9
      PLCDataReader/DataOperate/DataHelper.cs
  2. 2 2
      PLCDataReader/Login.Designer.cs

+ 9 - 9
PLCDataReader/DataOperate/DataHelper.cs

@@ -785,15 +785,15 @@ namespace UAS_PLCDataReader.DataOperate
                     DateTime[] time = new DateTime[names[i].Length];
                     for (int j = 0; j < names[i].Length; j++)
                     {
-                        try
-                        {
-                            time[j] = Convert.ToDateTime(names[i][j]);
-                            command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Date, time, ParameterDirection.Input));
-                        }
-                        catch (Exception)
-                        {
-                            command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
-                        }
+                        time[j] = Convert.ToDateTime(names[i][j]);
+                    }
+                    try
+                    {
+                        command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Date, time, ParameterDirection.Input));
+                    }
+                    catch (Exception)
+                    {
+                        command.Parameters.Add(new OracleParameter(names[0][i - 1].ToString(), OracleDbType.Varchar2, names[i], ParameterDirection.Input));
                     }
                 }
                 else

+ 2 - 2
PLCDataReader/Login.Designer.cs

@@ -57,7 +57,7 @@
             this.PassWord.Properties.Appearance.Options.UseFont = true;
             this.PassWord.Properties.PasswordChar = '*';
             this.PassWord.Size = new System.Drawing.Size(145, 28);
-            this.PassWord.TabIndex = 0;
+            this.PassWord.TabIndex = 2;
             this.PassWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PassWord_KeyDown);
             // 
             // UserName_label
@@ -97,7 +97,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.Master.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
             this.Master.Size = new System.Drawing.Size(145, 28);
-            this.Master.TabIndex = 5;
+            this.Master.TabIndex = 3;
             // 
             // Master_label
             //