jingh
2021-02-28 a8d6e89a914ef0f729df080cb3adf7ab4b038662
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace Tset
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            //string b="1";
            //string c="1";
            //string d="1";
            //string f="1";
            //string g="1";
            //string h="1";
            string sServer = "";
            string sDataBase ="";
            string sUser ="";
            string sPassword = "";
            //string a = "select HWHID,HSPID,HQty,HSumQtyMust,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo  from Kf_ICInventory_FIFO_Tmp where HInterID=" + b.ToString() + " and HBillType='" + c + "'  and HKFDate='" + d + "' and HMaterID='" + f + "'and HSPID=" + g + " and HBatchNo= '" + h + "'";
            //string j = "0";
            string connString = "server=.;database=HX_LimsSys;uid=HX_User;password=lc@841022 providerName=System.Data.SqlClient";
           // string[] sArray = connString.Split(new char[3] { 'j', '_' });
            string[] sArray = connString.Split(new string[] { "=", ";"," " }, StringSplitOptions.RemoveEmptyEntries);
 
            sServer = sArray[1].ToString();
            sDataBase = sArray[3].ToString();
            sUser = sArray[5].ToString();
            sPassword = sArray[7].ToString();
            MessageBox.Show(sServer);
            MessageBox.Show(sDataBase);
            MessageBox.Show(sUser);
            MessageBox.Show(sPassword);
        }
    }
}