コード例 #1
0
        private void AddBtn_Click(object sender, EventArgs e)
        {
            Form_new_wholesale_cost cost = new Form_new_wholesale_cost(barcode);

            if (cost.ShowDialog() == DialogResult.OK)
            {
                FillTable();
            }
        }
コード例 #2
0
        private void editCost(int rowIndex)
        {
            var    cellText      = dataGridView1.Rows[rowIndex].Cells["descuento"].Value.ToString();
            double discount      = cellText.IndexOf("%") > -1 ? Convert.ToDouble(cellText.Substring(0, cellText.Length - 1)) : Convert.ToDouble(cellText);
            bool   isbypercenage = cellText.IndexOf("%") > -1;

            Form_new_wholesale_cost cost = new Form_new_wholesale_cost(barcode, Convert.ToDouble(dataGridView1.Rows[rowIndex].Cells["cantidad"].Value),
                                                                       discount, isbypercenage, Convert.ToInt32(dataGridView1.Rows[rowIndex].Cells["id_cost"].Value));


            if (cost.ShowDialog() == DialogResult.OK)
            {
                FillTable();
            }
            this.Show();
        }