Пример #1
0
        private void btnAddIn_Click(object sender, EventArgs e)
        {
            frmInOut editor = new frmInOut(true);

            if (editor.ShowDialog() == DialogResult.OK)
            {
                if (DAL.AddInOut(editor.InOut))
                {
                    this.ViewAll();
                }
            }
        }
Пример #2
0
        private void btnEditOut_Click(object sender, EventArgs e)
        {
            VOut vOut = this.GetFirstSelectedVOut();

            if (vOut != null)
            {
                InOut    inOut  = DAL.GetInOutByVOut(vOut);
                int      oldId  = inOut.ID;
                frmInOut editor = new frmInOut(inOut);
                if (editor.ShowDialog() == DialogResult.OK)
                {
                    if (DAL.EditInOut(oldId, inOut))
                    {
                        this.ViewAll();
                    }
                }
            }
        }