コード例 #1
0
        private void Get_SysConfig_TaxTitle()
        {
            DataAccessPOS dbPOS = new DataAccessPOS();

            sysConfs.Clear();
            sysConfs = dbPOS.Get_SysConfig_By_Name("Tax1");
            if (sysConfs.Count == 1)
            {
                checkTax1.Text = sysConfs[0].ConfigValue;
            }
            sysConfs.Clear();
            sysConfs = dbPOS.Get_SysConfig_By_Name("Tax2");
            if (sysConfs.Count == 1)
            {
                checkTax2.Text = sysConfs[0].ConfigValue;
            }
            sysConfs.Clear();
            sysConfs = dbPOS.Get_SysConfig_By_Name("Tax3");
            if (sysConfs.Count == 1)
            {
                checkTax3.Text = sysConfs[0].ConfigValue;
            }
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: LINOHWANG/CUBE
        private void dgvData_Prod_Initialize()
        {
            DataAccessPOS dbPOS = new DataAccessPOS();

            this.dgvData.AutoSize = false;
            dgvData.Rows.Clear();
            //this.dataGridActivity.AutoGenerateColumns = false;
            //this.dataGridActivity.RowHeadersVisible = false;
            //this.dataGridActivity.MultiSelect = false;
            this.dgvData.SelectionMode             = DataGridViewSelectionMode.FullRowSelect;
            this.dgvData.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.AllCells;
            this.dgvData.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            this.dgvData.ColumnCount      = 12;
            this.dgvData.Columns[0].Name  = "Id";
            this.dgvData.Columns[0].Width = 50;
            this.dgvData.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
            this.dgvData.Columns[1].Name  = "Product Name";
            this.dgvData.Columns[1].Width = 120;
            this.dgvData.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
            this.dgvData.Columns[2].Name  = "Second Name";
            this.dgvData.Columns[2].Width = 120;
            this.dgvData.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
            this.dgvData.Columns[3].Name  = "UnitPrice";
            this.dgvData.Columns[3].Width = 120;
            this.dgvData.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
            this.dgvData.Columns[4].Name  = dbPOS.Get_SysConfig_By_Name("Tax1")[0].ConfigValue;
            this.dgvData.Columns[4].Width = 50;
            this.dgvData.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[5].Name  = dbPOS.Get_SysConfig_By_Name("Tax2")[0].ConfigValue; // "Tax2";
            this.dgvData.Columns[5].Width = 50;
            this.dgvData.Columns[5].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[6].Name  = dbPOS.Get_SysConfig_By_Name("Tax3")[0].ConfigValue; // "Tax3";
            this.dgvData.Columns[6].Width = 50;
            this.dgvData.Columns[6].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[7].Name  = "PRT1";
            this.dgvData.Columns[7].Width = 50;
            this.dgvData.Columns[7].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[8].Name  = "PRT2";
            this.dgvData.Columns[8].Width = 50;
            this.dgvData.Columns[8].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[9].Name  = "PRT3";
            this.dgvData.Columns[9].Width = 50;
            this.dgvData.Columns[9].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[10].Name  = "PRT4";
            this.dgvData.Columns[10].Width = 50;
            this.dgvData.Columns[10].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.Columns[11].Name  = "PRT5";
            this.dgvData.Columns[11].Width = 50;
            this.dgvData.Columns[11].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

            this.dgvData.DefaultCellStyle.Font = new Font("Arial", 16F, GraphicsUnit.Pixel);

            this.dgvData.EnableHeadersVisualStyles               = false;
            this.dgvData.ColumnHeadersDefaultCellStyle.Font      = new Font("Arial", 18F, GraphicsUnit.Pixel);
            this.dgvData.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            this.dgvData.ColumnHeadersDefaultCellStyle.BackColor = Color.LightBlue;
            // fix the row height
            dgvData.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.None;
            dgvData.AllowUserToResizeRows     = false;
            dgvData.RowTemplate.Resizable     = DataGridViewTriState.True;
            dgvData.RowTemplate.MinimumHeight = 40;
        }