Exemplo n.º 1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     operationTypeBindingSource.EndEdit();
     var operation = operationTypeBindingSource.Current as OperationType;
     operation = new OperationTypesRepository().Save(operation);
     this.DialogResult = DialogResult.OK;
     this.Close();
 }
Exemplo n.º 2
0
 public static OperationType GetById(int id)
 {
     OperationType oper;
     if (!_operationTypes.TryGetValue(id, out oper))
     {
         oper = new OperationTypesRepository().GetOperationType(id);
         _operationTypes.Add(id, oper);
     }
     return oper;
 }
Exemplo n.º 3
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     timer1.Stop();
     var opers = new OperationTypesRepository().GetOperationTypes(flagOperation, flagBankOrKassa);
     if (btnUseOnly.Checked)
         opers = opers.Where(c => !c.IsNotActived).ToList();
     if (!String.IsNullOrEmpty(txtFilter.Text))
         opers = opers.Where(c => c.Description.ToUpper().Contains(txtFilter.Text.ToUpper())).ToList();
     operationTypeBindingSource.DataSource = opers;
 }