예제 #1
0
        public ShipmentEditForm(ShipmentsListForm instance)
        {
            this.instance = instance;
            InitializeComponent();

            query      = new QueryContractShipment();
            queryStore = new QueryStore();
            queryProd  = new QueryProducts();

            this.Text         = Properties.Resources.Shipment;
            label1.Text       = Properties.Resources.Good;
            label2.Text       = Properties.Resources.Date;
            label3.Text       = Properties.Resources.FromStorage;
            label4.Text       = Properties.Resources.FromCell;
            label5.Text       = Properties.Resources.Amount;
            buttonCancel.Text = Properties.Resources.Cancel;
            buttonOK.Text     = Properties.Resources.OK;

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

            foreach (var item in queryStore.querySelectStorehouses())
            {
                lObj3.Add(new ObjectComboBox(item.Id, item.Name));
            }

            comboBoxStorehouses.DataSource    = lObj3;
            comboBoxStorehouses.ValueMember   = "Id";
            comboBoxStorehouses.DisplayMember = "Name";

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

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

            comboBoxProducts.DataSource = lObjPr;

            comboBoxProducts.ValueMember   = "Id";
            comboBoxProducts.DisplayMember = "Name";
        }
예제 #2
0
 public ShipmentEditForm(ShipmentsListForm instance, int Id)
     : this(instance)
 {
     this.Id = Id;
     addDataForUpdate();
 }
예제 #3
0
        private void buttonShipmentsList_Click(object sender, EventArgs e)
        {
            ShipmentsListForm f = new ShipmentsListForm();

            f.ShowDialog();
        }