Эх сурвалжийг харах

修改外网FTP地址,添加显示地址限制

章政 7 жил өмнө
parent
commit
2d6b736320

+ 1 - 1
UAS-出货标签管理/App.config

@@ -51,7 +51,7 @@
         <value />
       </setting>
       <setting name="FTPAddress" serializeAs="String">
-        <value>ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8</value>
+        <value>ftp://218.18.115.198:21|Print|Administrator1@#</value>
       </setting>
     </UAS_LabelMachine.Properties.Settings>
   </userSettings>

+ 15 - 1
UAS-出货标签管理/Login.cs

@@ -14,6 +14,9 @@ namespace UAS_LabelMachine
     {
         DataHelper dh;
         DataTable dt;
+        //集团设置显示账号
+        string Masters = "XSQ,N_YITOA_YWC,ZXN,N_YITOA_LHCT,N_YITOA_CT,N_CHL,N_YITOA_HK,N_HUASL_SHTL,N_WILICHK,N_WILIC,N_E_SHINE_SH,N_SHBJ,N_BJKG,N_HUASL,N_HUASL_QD,N_HUASL_XM,N_HUASL_SZ";
+
         public Login()
         {
             InitializeComponent();
@@ -32,9 +35,20 @@ namespace UAS_LabelMachine
             dh = new DataHelper();
             //获取账套信息
             dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from master ", "select");
+            DataTable MasterDB = dt.Clone();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                if (Masters.Contains(dt.Rows[i]["ma_user"].ToString()))
+                {
+                    DataRow dr = MasterDB.NewRow();
+                    dr["ma_user"] = dt.Rows[i]["ma_user"];
+                    dr["ma_function"] = dt.Rows[i]["ma_function"];
+                    MasterDB.Rows.Add(dr);
+                }
+            }
             MasterCombox.DisplayMember = "ma_function";
             MasterCombox.ValueMember = "ma_user";
-            MasterCombox.DataSource = dt;
+            MasterCombox.DataSource = MasterDB;
             //读取上次登陆时的用户名和选择的账套
             UserName.Text = Properties.Settings.Default.LastLoginUser;
             MasterCombox.Text = Properties.Settings.Default.LastLoginMaster;

+ 1 - 1
UAS-出货标签管理/Properties/Settings.settings

@@ -15,7 +15,7 @@
       <Value Profile="(Default)" />
     </Setting>
     <Setting Name="FTPAddress" Type="System.String" Scope="User">
-      <Value Profile="(Default)">ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8</Value>
+      <Value Profile="(Default)">ftp://218.18.115.198:21|Print|Administrator1@#</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 1 - 1
UAS-出货标签管理/Properties/Settings1.Designer.cs

@@ -73,7 +73,7 @@ namespace UAS_LabelMachine.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8")]
+        [global::System.Configuration.DefaultSettingValueAttribute("ftp://218.18.115.198:21|Print|Administrator1@#")]
         public string FTPAddress {
             get {
                 return ((string)(this["FTPAddress"]));

+ 1 - 1
UAS-出货标签管理/PublicMethod/DataHelper.cs

@@ -15,7 +15,7 @@ namespace UAS_LabelMachine
         //怡海能达FTP
         //ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8
         //华商龙FTP
-        //ftp://10.1.1.38|Print|Administrator1@#
+        //ftp://218.18.115.198:21|Print|Administrator1@#
         //系统默认的的连接字符串
         //private readonly string ConnectionStrings = "Data Source=218.17.158.219/orcl;User ID=UAS_DEV;PassWord=select!#%*(";
         //富为内网地址