Example #1
0
        public static void AddTaxcfg(taxcfg entity)
        {
            var sqlstr = $"delete taxconfig where sort_typ='{ entity.sortTyp }'";

            ExecSql(sqlstr);
            var flg = entity.flg ? "1" : "0";

            sqlstr = $"insert taxconfig (sort_typ, tax_per, flg, trn_cd) values('{entity.sortTyp}',{entity.taxPer},'{ flg }', '{ entity.trnCd }')";
            ExecSql(sqlstr);
        }
Example #2
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            var taxcfg = new taxcfg()
            {
                sortTyp = sortTypComboBox.SelectedValue.ToString(),
                flg     = flgCheckBox.Checked,
                taxPer  = taxPerNumber.Value,
                trnCd   = trnCdTextBox.Text,
            };

            DbHelper.AddTaxcfg(taxcfg);
            UpdateData();
        }