コード例 #1
0
ファイル: frmOperationEdit.cs プロジェクト: lexxkrt/usno
 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();
 }
コード例 #2
0
ファイル: OperationType.cs プロジェクト: lexxkrt/usno
 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;
 }
コード例 #3
0
ファイル: frmOperations.cs プロジェクト: lexxkrt/usno
 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;
 }