示例#1
0
        public void Initializeaza()
        {
            base.InitializeazaVariabileleGenerale();

            incepeIncarcarea();

            this.txtCautare.Goleste();
            this.txtTotal.AllowModification(false);

            this.txtSerieFactura.AllowModification(false);
            this.txtNumarFactura.AllowModification(false);

            this.cboTip.DataSource    = BClientiFacturi.StructTipDocumentNotaPlata.GetList();
            this.cboTip.ValueMember   = "Id";
            this.cboTip.DisplayMember = "Nume";

            if (this.lFactura == null || !this.lFactura.EsteFiscalizata())
            {
                //este proforma:
                this.ctrlDataOraFactura.Initializeaza(DateTime.Now, ComboBoxOra.EnumPas.CinciMinute);
                this.txtCursSchimb.ValoareDouble = BComportamentAplicatie.GetCursBNR();
                this.txtSerieFactura.Goleste();
                this.txtNumarFactura.Goleste();
                this.txtObservatii.Goleste();
                this.txtNumarFactura.Visible = false;
                this.txtSerieFactura.Visible = false;
                this.lblSerieNr.Visible      = false;
                this.lblSeparatorSerieNumarFactura.Visible = false;
                this.btnFiscalizeaza.Visible = this.lFactura != null;
                this.cboTip.SelectedItem     = BClientiFacturi.EnumTipDocumentNotaPlata.Proforma;
            }
            else
            {
                //este factura:
                this.ctrlDataOraFactura.Initializeaza(this.lFactura.DataFactura, ComboBoxOra.EnumPas.CinciMinute);
                this.txtCursSchimb.ValoareDouble = this.lFactura.CursBNR;
                this.txtSerieFactura.Text        = this.lFactura.SerieFactura;
                this.txtNumarFactura.Text        = this.lFactura.NumarFactura.ToString();
                this.txtObservatii.Text          = this.lFactura.Observatii;
                this.ctrlMoneda.Moneda           = this.lFactura.MonedaFactura;

                this.btnFiscalizeaza.Visible = !this.lFactura.EsteFiscalizata();

                //this.txtNumarFactura.Visible = false;
                //this.txtSerieFactura.Visible = false;
                //this.lblSerieNr.Visible = false;
                //this.lblSeparatorSerieNumarFactura.Visible = false;

                this.cboTip.SelectedItem = this.lFactura.GetTipDocumentNotaPlata();
                this.cboTip.AllowModification(false);
            }

            ConstruiesteColoaneDGV();
            ConstruiesteRanduriDGV();

            initTotal();

            finalizeazaIncarcarea();
        }
示例#2
0
        public void Initializeaza()
        {
            base.InitializeazaVariabileleGenerale();

            incepeIncarcarea();

            this.chkEuAlegCursulDeSchimb.Checked = BComportamentAplicatie.GetSeFolosesteCursBNRSetatDeUser();
            this.txtCursSchimb.ValoareDouble     = BComportamentAplicatie.GetCursBNR();

            finalizeazaIncarcarea();
        }
        public void Initializeaza(BClientiPlati pPlata)
        {
            base.InitializeazaVariabileleGenerale();

            incepeIncarcarea();

            this.ctrlDataOraIncasare.Initializeaza(DateTime.Now, ComboBoxOra.EnumPas.CinciMinute);
            this.cboModalitateIncasare.DataSource = BDefinitiiGenerale.StructModalitatePlata.GetListaModalitatiAchitare(false);
            //this.cboModalitateIncasare.ValueMember = "Id";
            //this.cboModalitateIncasare.DisplayMember = "Nume";

            //this.txtCursSchimb.ValoareDouble = BComportamentAplicatie.GetCursBNR();
            //this.txtSuma.Goleste();

            if (pPlata != null)
            {
                this.ctrlDataOraIncasare.Initializeaza(pPlata.DataPlata, ComboBoxOra.EnumPas.CinciMinute);
                this.cboModalitateIncasare.SelectedItem = pPlata.ModalitatePlata;
                this.txtCursSchimb.Text = pPlata.CursBNR.ToString();
                this.txtSuma.Text       = pPlata.ToStringSumaPlatita();
                this.txtObservatii.Text = pPlata.Observatii;
                this.txtSuma.AllowModification(false);
                this.lblSold.Visible = false;
                this.ctrlLeiEuro.AllowModification(false);
                this.ctrlDataOraIncasare.AllowModification(false);
            }
            else
            {
                this.ctrlDataOraIncasare.Initializeaza(DateTime.Now, ComboBoxOra.EnumPas.CinciMinute);
                this.txtCursSchimb.ValoareDouble = BComportamentAplicatie.GetCursBNR();
                this.txtSuma.Goleste();
                this.txtSuma.Focus();
                this.txtObservatii.Goleste();
                this.cboModalitateIncasare.SelectedItem = BDefinitiiGenerale.EnumModalitatePlata.Banca;
                initTotal();
            }

            ConstruiesteColoaneDGV();
            ConstruiesteRanduriDGV();

            initSoldClient();

            finalizeazaIncarcarea();
        }