Пример #1
0
 private void DGVAddRefund(Refund r)
 {
     _dataGridViewRefund.Rows.Add();
     using (var row = _dataGridViewRefund.Rows[_dataGridViewRefund.Rows.Count - 1])
     {
         row.Cells[ColumnRfdAmount.Index].Value             = String.Format("{0:0.00}", r.Amount);
         row.Cells[ColumnRfdCurrency.Index].Value           = _intFnc.CurrentActivity.CurrencyUsed;
         row.Cells[ColumnRfdCurrencyPict.Index].Value       = GetCurrencyImage(_intFnc.CurrentActivity.CurrencyUsed);
         row.Cells[ColumnRfdUserGiver.Index].Value          = EntityFinancialDecorator.GetUser(_intFnc.CurrentActivity.Entities, r.Giver).GetName();
         row.Cells[ColumnRfdAvatar.Index].Value             = ResourceIconSet16Default.error;
         row.Cells[ColumnRfdUserReceiver.Index].Value       = EntityFinancialDecorator.GetUser(_intFnc.CurrentActivity.Entities, r.Receiver).GetName();
         row.Cells[ColumnRfdExchangeDone.Index].Value       = ResourceIconSet16Default.coins_in_hand;
         row.Cells[ColumnRfdExchangeDone.Index].ToolTipText = "This exchange is completed.";
         row.Cells[ColumnRfdGift.Index].Value           = ResourceIconSet16Default.gift_add;
         row.Cells[ColumnRfdGift.Index].ToolTipText     = "No refund, the receiver make a gift.";
         row.Cells[ColumnRfdCanceled.Index].Value       = ResourceIconSet16Default.door_out;
         row.Cells[ColumnRfdCanceled.Index].ToolTipText = "This exchange will never be done. \r\nAmount will be paid by other participants.";
         row.Cells[ColumnRfdStatus.Index].Value         = r.CurrentStatus;
         row.Cells[ColumnRfdId.Index].Value             = r.ID;
     }
 }
Пример #2
0
 private void RefundCompleteExchange(int rowIndex)
 {
     _dataGridViewRefund.Rows[rowIndex].Cells[_dataGridViewRefund.Columns.IndexOf(ColumnRfdStatus)].Value = "Completed";
     Refund.GetRefund(_intFnc.CurrentActivity.Refunds, _dataGridViewRefund.Rows[rowIndex].Cells[ColumnRfdId.Index].Value.ToString()).CurrentStatus = Refund.Status.REFUNDED;
 }
Пример #3
0
 private void RefundCancel(int rowIndex)
 {
     _dataGridViewRefund.Rows[rowIndex].Cells[_dataGridViewRefund.Columns.IndexOf(ColumnRfdStatus)].Value = "Canceled";
     Refund.GetRefund(_intFnc.CurrentActivity.Refunds, _dataGridViewRefund.Rows[rowIndex].Cells[ColumnRfdId.Index].Value.ToString()).CurrentStatus = Refund.Status.CANCELED;
 }
Пример #4
0
 private void RefundGift(int rowIndex)
 {
     _dataGridViewRefund.Rows[rowIndex].Cells[_dataGridViewRefund.Columns.IndexOf(ColumnRfdStatus)].Value = "Gift";
     Refund.GetRefund(_intFnc.CurrentActivity.Refunds, _dataGridViewRefund.Rows[rowIndex].Cells[ColumnRfdId.Index].Value.ToString()).CurrentStatus = Refund.Status.GIFT;
 }