Ejemplo n.º 1
0
        private void btn_changeSupplyRate_Click(object sender, EventArgs e)
        {
            FrmAmountInput f = new FrmAmountInput();

            f.lbl_inputLabel.Text = "Enter Supply Rate";

            if (f.ShowDialog() == DialogResult.OK)
            {
                txb_supply_rate.Text = f.txb_input.Text;
                Functions.SetOptionValues("ppm_supply_rate", new string[] { txb_supply_rate.Text, "", "", "", "", "" });
                refreshDGV();
            }
        }
Ejemplo n.º 2
0
        private void btn_change_factor_Click(object sender, EventArgs e)
        {
            if (dgv_prices.SelectedRows.Count == 0)
            {
                MessageBox.Show("Please select atleast one item", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            FrmAmountInput f = new FrmAmountInput();

            f.lbl_inputLabel.Text = "Enter Factor";

            if (f.ShowDialog() == DialogResult.OK)
            {
                foreach (DataGridViewRow r in dgv_prices.SelectedRows)
                {
                    Functions.SqlNonQuery(string.Format("replace into {0} (coa_name, factor) values ('{1}','{2}')", factor_table, r.Cells["Item"].Value, f.txb_input.Text));

                    r.Cells["Factor"].Value = f.txb_input.Text;
                }

                refreshDGV();
            }
        }