Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var form = new SellFactorForm();

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                dgvFactorsRefresh();
            }
        }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgvFactors.SelectedRows.Count == 0)
            {
                return;
            }

            var id   = Convert.ToInt32(dgvFactors.SelectedRows[0].Cells["clnId"].Value);
            var db   = new shampazEntities();
            var form = new SellFactorForm();

            form.EditedSellFactor = db.SellFactors.Where(x => x.Id == id).FirstOrDefault();
            form.ShowDialog();
        }
Beispiel #3
0
        private void btnSellFactor_Click_1(object sender, EventArgs e)
        {
            var form = new SellFactorForm();

            form.ShowDialog();
        }