Example #1
0
        private void изменитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var oper = operationTypeBindingSource.Current as OperationType;
            if (oper == null) return;

            var frm = new frmOperationEdit(oper.Id, oper.FlagOperation, oper.BankOrKassa);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                ShowOperationType(frm.CurrentOperationType.Id);
            }
        }
Example #2
0
 private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmOperationEdit frm;
     switch (tabControl1.SelectedTab.Name)
     {
         case "tabPageBankDebet":
             frm = new frmOperationEdit(0,FlagOperation.Debet,BankOrKassa.Bank);
             break;
         case "tabPageBankKredit":
             frm = new frmOperationEdit(0, FlagOperation.Kredit, BankOrKassa.Bank);
             break;
         case "tabPageKassaDebet":
             frm = new frmOperationEdit(0, FlagOperation.Debet, BankOrKassa.Kassa);
             break;
         case "tabPageKassaKredit":
             frm = new frmOperationEdit(0, FlagOperation.Kredit, BankOrKassa.Kassa);
             break;
         default:
             frm = new frmOperationEdit(0, FlagOperation.Debet, BankOrKassa.Bank);
             break;
     }
     if (frm.ShowDialog() == DialogResult.OK)
     {
         ShowOperationType(frm.CurrentOperationType.Id);
     }
 }
Example #3
0
 private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var frm = new frmOperationEdit(0, flagOperation, flagBankOrKassa);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         operationTypeBindingSource.DataSource = new OperationTypesRepository().GetOperationTypes(flagOperation, flagBankOrKassa);
     }
 }
Example #4
0
        private void изменитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var operation = operationTypeBindingSource.Current as OperationType;
            if (operation == null) return;

            var frm = new frmOperationEdit(operation.Id, flagOperation, flagBankOrKassa);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                operationTypeBindingSource.DataSource = new OperationTypesRepository().GetOperationTypes(flagOperation, flagBankOrKassa);
            }
        }