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 SuppluEditForm(SupplyListForm instance) { this.instance = instance; InitializeComponent(); query = new QueryContractSupply(); queryProd = new QueryProducts(); queryContractors = new QueryContractors(); this.Text = Properties.Resources.Supply; labelId.Text = Properties.Resources.SupplyContract; label2.Text = Properties.Resources.Date; label3.Text = Properties.Resources.Goods; label4.Text = Properties.Resources.Number; labelAmount.Text = Properties.Resources.Amount; labelWasReceived.Text = Properties.Resources.Received; labelContractors.Text = Properties.Resources.Contractor; buttonCancel.Text = Properties.Resources.Cancel; buttonOK.Text = Properties.Resources.OK; ArrayList lObjPr = new ArrayList(); foreach (var item in queryProd.querySelectProducts()) { lObjPr.Add(new { Id = item.Id, Name = item.Name }); } comboBoxProducts.DataSource = lObjPr; comboBoxProducts.ValueMember = "Id"; comboBoxProducts.DisplayMember = "Name"; List <bool> lObjBool = new List <bool> { true, false }; comboBoxWasReceived.DataSource = lObjBool; ArrayList lObjContr = new ArrayList(); foreach (var item in queryContractors.querySelectContractors(2)) { lObjContr.Add(new { Id = item.Id, Name = item.Name }); } comboBoxContractors.DataSource = lObjContr; comboBoxContractors.ValueMember = "Id"; comboBoxContractors.DisplayMember = "Name"; }
private void buttonSupplyList_Click(object sender, EventArgs e) { SupplyListForm f = new SupplyListForm(); f.ShowDialog(); }
public SuppluEditForm(SupplyListForm instance, int Id) : this(instance) { this.Id = Id; addDataForUpdate(); }