public frmOperations(FlagOperation flagOperation, BankOrKassa flagBankOrKassa) { InitializeComponent(); this.flagOperation = flagOperation; this.flagBankOrKassa = flagBankOrKassa; timer1_Tick(null, null); }
public frmOperationEdit(int id, FlagOperation flagOperation, BankOrKassa bankOrKassa) { InitializeComponent(); operationTypeBindingSource.DataSource = (id == 0) ? new OperationType { Id = 0, Description = "", FlagOperation = flagOperation, IsNotActived = false, BankOrKassa = bankOrKassa } : new OperationTypesRepository().GetOperationType(id); this.Text = "Тип операции/" + ((id == 0) ? "Новый*" : "Изменить"); }
public List<OperationType> GetOperationTypes(FlagOperation flagOperation, BankOrKassa flagBankOrKassa) { return this.OperationTypes.Where(c => (c.FlagOperation == flagOperation) && (c.BankOrKassa == flagBankOrKassa)).ToList(); }