Exemple #1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            refreshLineTotals();

            Fiche = bindTool.DataObject;
            if (isNew)
            {
                Fiche.CreatedBy   = StaticData.CurrentUserId;
                Fiche.CreatedDate = DateTime.Now;
            }
            Fiche.DocTypeId = DocumentType.Id;

            if (CreateInvoiceFromOrderFiche)
            {
                Fiche.DocTypeId   = DocumentType.Id = 2;
                Fiche.CreatedDate = DateTime.Now;
                Fiche.CreatedBy   = StaticData.CurrentUserId;
                Fiche.Id          = 0;
            }
            Operation <FicheMasterView> postedFiche = OperationHandler.PostFiche(Fiche);

            if (postedFiche.Successful)
            {
                Close();
            }
            SetError(postedFiche.Fail, false);
        }