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); } }
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); } }
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); } }
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); } }