Пример #1
0
        public CardEditForm(CardsListForm instance)
        {
            this.instance = instance;
            InitializeComponent();

            query     = new QueryTechnologicalCards();
            queryProd = new QueryProducts();

            this.Text         = Properties.Resources.Card;
            label1.Text       = Properties.Resources.Title;
            label2.Text       = Properties.Resources.InputGoods;
            label3.Text       = Properties.Resources.OutputGoods;
            label4.Text       = Properties.Resources.Date;
            buttonCancel.Text = Properties.Resources.Cancel;
            labelAmount1.Text = Properties.Resources.Amount;
            labelAmount2.Text = Properties.Resources.Amount;
            buttonOK.Text     = Properties.Resources.OK;

            List <ObjectComboBox> lObjPr1 = new List <ObjectComboBox>();

            foreach (var item in queryProd.querySelectProducts())
            {
                lObjPr1.Add(new ObjectComboBox(item.Id, item.Name));
            }

            comboBoxProductsImport.DataSource = lObjPr1;

            comboBoxProductsImport.ValueMember   = "Id";
            comboBoxProductsImport.DisplayMember = "Name";

            List <ObjectComboBox> lObjPr2 = new List <ObjectComboBox>();

            foreach (var item in queryProd.querySelectProducts())
            {
                lObjPr2.Add(new ObjectComboBox(item.Id, item.Name));
            }

            comboBoxProductsExport.DataSource = lObjPr2;

            comboBoxProductsExport.ValueMember   = "Id";
            comboBoxProductsExport.DisplayMember = "Name";
        }
Пример #2
0
 public CardEditForm(CardsListForm instance, int Id) : this(instance)
 {
     this.Id = Id;
     addDataForUpdate();
 }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            CardsListForm f = new CardsListForm();

            f.ShowDialog();
        }