예제 #1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            cardFiche           = ficheBindTool.DataObject;
            creditLine          = creditLineBindTool.DataObject;
            debitLine           = debitLineBindTool.DataObject;
            creditLine.SignType = -1;
            debitLine.SignType  = 1;
            cardFiche.Lines     = new List <CardFicheLine> {
                creditLine, debitLine
            };
            Operation <CardFiche> postedCashTransaction = OperationHandler.PostCardFiche(cardFiche);

            if (postedCashTransaction.Successful)
            {
                this.Close();
            }
            SetError(postedCashTransaction.Fail, false);
        }
예제 #2
0
 private void tsAcceptCashTran_Click(object sender, EventArgs e)
 {
     if (gvData.GetFocusedRow() is CardFicheLineView lineView)
     {
         DialogResult dialogResult = XtraMessageBox.Show("Əminsinizmi?", "Kassa Tranzaksiya", MessageBoxButtons.YesNo);
         if (dialogResult == DialogResult.Yes)
         {
             CardFiche cardFiche = OperationHandler.GetCardFicheById(lineView.CardFicheId).Value;
             cardFiche.StatusId = 12;
             var oper = OperationHandler.PostCardFiche(cardFiche);
             if (oper.Successful)
             {
                 XtraMessageBox.Show("Təhvil alındı");
             }
             else
             {
                 XtraMessageBox.Show("Səhvlik oldu " + oper.Fail);
             }
         }
     }
     RefreshData();
 }