Пример #1
0
        private void btmOK_Click(object sender, EventArgs e)
        {
            this.btmOK.Enabled = false;

            this.sgoiInsert.dobStuffAmount         = double.Parse(this.tbAmount.Text.Trim());
            this.sgoiInsert.intTechnicalActionType = ++this.cbActionType.SelectedIndex;
            this.sgoiInsert.Insert(this.cnConnection);

            StoreGetOutItems frmStoreGetOutItems = (StoreGetOutItems)this.Owner;

            frmStoreGetOutItems.SearchRequestItems();

            this.Close();
        }
        private void BtmStoreGetOutItems_Click(object sender, EventArgs e)
        {
            if (this.dgvStoreGetOuts.SelectedRows.Count != 0)
            {
                this.btmStoreGetOutItems.Enabled = false;
                StoreGetOutItems frmStoreGetOutItems = new StoreGetOutItems();

                frmStoreGetOutItems.sgoStoreGetOut.intNumber        = (int)this.dgvStoreGetOuts.SelectedRows[0].Cells["intNumber"].Value;
                frmStoreGetOutItems.sgoStoreGetOut.strRequesterCoID = this.dgvStoreGetOuts.SelectedRows[0].Cells["nvcRequesterCoID"].Value.ToString();
                frmStoreGetOutItems.sgoStoreGetOut.intDepartment    = (int)this.dgvStoreGetOuts.SelectedRows[0].Cells["intDepartment"].Value;
                frmStoreGetOutItems.sgoStoreGetOut.dtDate           = (DateTime)this.dgvStoreGetOuts.SelectedRows[0].Cells["datDate"].Value;

                frmStoreGetOutItems.sgoiSearch.intStoreGetOutNumber = (int)this.dgvStoreGetOuts.SelectedRows[0].Cells["intNumber"].Value;

                frmStoreGetOutItems.cnConnection = this.cnConnection;
                frmStoreGetOutItems.setSettings  = this.setSettings;
                frmStoreGetOutItems.usUser       = this.usLogined;
                frmStoreGetOutItems.ShowDialog();
                this.btmStoreGetOutItems.Enabled = true;
            }
        }