Example #1
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            if (this.tabControl1.SelectedIndex == 0)
            {
                SystemInfoTable systemInfo = new SystemInfoTable();

                systemInfo.companyName = this.textBoxCompanyName.Text;
                systemInfo.grows       = this.textBoxGorws.Text;
                systemInfo.bankAccount = this.textBoxBankAccount.Text;
                systemInfo.phone       = this.textBoxPhone.Text;
                systemInfo.fax         = this.textBoxFax.Text;
                systemInfo.eMail       = this.textBoxEmail.Text;
                systemInfo.address     = this.textBoxAddress.Text;

                // 当信息中的任何一项不为空时,保存
                if (systemInfo.companyName.Length > 0 ||
                    systemInfo.grows.Length > 0 ||
                    systemInfo.bankAccount.Length > 0 ||
                    systemInfo.phone.Length > 0 ||
                    systemInfo.fax.Length > 0 ||
                    systemInfo.eMail.Length > 0 ||
                    systemInfo.address.Length > 0)
                {
                    SystemInfo.getInctance().insert(systemInfo);
                }
            }
            else
            {
                // 业务参数页面信息
            }

            this.Close();
        }
Example #2
0
        private void readSystemInfoToUI()
        {
            SystemInfoTable systemInfo = new SystemInfoTable();

            systemInfo = SystemInfo.getInctance().getSystemInfo();

            this.textBoxCompanyName.Text = systemInfo.companyName;
            this.textBoxGorws.Text       = systemInfo.grows;
            this.textBoxBankAccount.Text = systemInfo.bankAccount;
            this.textBoxPhone.Text       = systemInfo.phone;
            this.textBoxFax.Text         = systemInfo.fax;
            this.textBoxEmail.Text       = systemInfo.eMail;
            this.textBoxAddress.Text     = systemInfo.address;
        }
Example #3
0
    public List <SystemInfoTable> QuerySystemInfoTable()
    {
        string           sqlstr = string.Format("SELECT * FROM SystemInfoTable WHERE isSync='{0}'", "0");
        SqliteDataReader sdr    = db.ExecuteQuery(sqlstr);

        List <SystemInfoTable> tables = new List <SystemInfoTable>();

        while (sdr.Read())
        {
            SystemInfoTable table = new SystemInfoTable
            {
                id = sdr.GetInt32(sdr.GetOrdinal("id")).ToString(),
                deviceUniqueIdentifier = sdr.GetString(sdr.GetOrdinal("deviceUniqueIdentifier")),
                graphicsDeviceID       = sdr.GetString(sdr.GetOrdinal("graphicsDeviceID")),
                macAddress             = sdr.GetString(sdr.GetOrdinal("macAddress")),
                registerDate           = sdr.GetString(sdr.GetOrdinal("registerDate")),
                useDate = sdr.GetString(sdr.GetOrdinal("useDate")),
                isSync  = sdr.GetInt32(sdr.GetOrdinal("isSync"))
            };
            tables.Add(table);
        }
        sdr.Close();
        return(tables);
    }