public MainForm() { InitializeComponent(); buttonEmployeesList.Text = Properties.Resources.Employees; buttonStoragesList.Text = Properties.Resources.Storages; buttonCellsList.Text = Properties.Resources.Cells; buttonGoodsList.Text = Properties.Resources.Goods; buttonContractorsList.Text = Properties.Resources.Contractors; buttonCardsList.Text = Properties.Resources.Cards; // buttonSupplyContracts.Text = Properties.Resources.SupplyContracts; buttonSupplyList.Text = Properties.Resources.Supplies; buttonMovementsList.Text = Properties.Resources.Movements; buttonShipmentsList.Text = Properties.Resources.Shipments; buttonOperationsList.Text = Properties.Resources.Operations; buttonBalance.Text = Properties.Resources.Balance; buttonPrediction.Text = Properties.Resources.Predict; this.Text = Properties.Resources.PapaCarlo; if (LoginInfo.Position == 1)//Начальник { SupplyListForm f = new SupplyListForm(); f.ShowDialog(); } else if (LoginInfo.Position == 2)//Бухгалтер { BalanceForm f = new BalanceForm(); f.ShowDialog(); } else if (LoginInfo.Position == 3)//Кладовщик { MovementsListForm f = new MovementsListForm(); f.ShowDialog(); } showButtonsForPosition(); }
public MovementEditForm(MovementsListForm instance) { this.instance = instance; InitializeComponent(); query = new QueryContractMove(); queryStore = new QueryStore(); queryProd = new QueryProducts(); this.Text = Properties.Resources.Movement; label1.Text = Properties.Resources.Good; label7.Text = Properties.Resources.Amount; label2.Text = Properties.Resources.Date; label3.Text = Properties.Resources.FromStorage; label4.Text = Properties.Resources.FromCell; label6.Text = Properties.Resources.ToStorage; label5.Text = Properties.Resources.ToCell; buttonCancel.Text = Properties.Resources.Cancel; buttonOK.Text = Properties.Resources.OK; List <ObjectComboBox> lObj1 = new List <ObjectComboBox>(); foreach (var item in queryStore.querySelectStorehouses()) { lObj1.Add(new ObjectComboBox(item.Id, item.Name)); } comboBoxStorehouseFrom.DataSource = lObj1; comboBoxStorehouseFrom.ValueMember = "Id"; comboBoxStorehouseFrom.DisplayMember = "Name"; List <ObjectComboBox> lObj3 = new List <ObjectComboBox>(); foreach (var item in queryStore.querySelectStorehouses()) { lObj3.Add(new ObjectComboBox(item.Id, item.Name)); } comboBoxStorehouseTo.DataSource = lObj3; comboBoxStorehouseTo.ValueMember = "Id"; comboBoxStorehouseTo.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"; }
public MovementEditForm(int Id, MovementsListForm instance) : this(instance) { this.Id = Id; addDataForUpdate(); }
private void buttonMovementsList_Click(object sender, EventArgs e) { MovementsListForm f = new MovementsListForm(); f.ShowDialog(); }