Exemplo n.º 1
0
 private void bindingSource1_PositionChanged(object sender, EventArgs e)
 {
     if (bindingSource1.Current != null)
     {
         persoanaCurenta = bindingSource1.Current as PersoanaIMO;
     }
     else
     {
         persoanaCurenta = null;
     }
 }
Exemplo n.º 2
0
        public PrintForm(string titlu, int id, string nume, string prenume, bool anulat, string functie, string cod, int numar, string firma)
        {
            InitializeComponent();
            muncitor = new PersoanaIMO();

            muncitor.Id = id;
            muncitor.Nume = nume;
            muncitor.Prenume = prenume;
            muncitor.Cod = cod;
            muncitor.Functie = functie;
            muncitor.Numar = numar;
            muncitor.Firma = firma;
            this.Id = id;
            this.Nume = nume;
            this.Prenume = prenume;
            this.Anulat = anulat;
            this.Cod = cod;

            this.Text = titlu;
            lbNume.Text = nume;
            lbPrenume.Text = prenume;
            lbCod.Text = cod;
            lbNumar.Text = numar.ToString();
        }
Exemplo n.º 3
0
 public BarCodeMuncitor(PersoanaIMO muncitor)
 {
     InitializeComponent();
     bindingSource1.DataSource = muncitor;
 }
Exemplo n.º 4
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            long j = 0;
            long k = 0;
            IList<PersoanaIMO> muncitori = new List<PersoanaIMO>();
            try
            {
                if (txtMinInterval.Value>txtMaxInterval.Value)
                {
                    MessageBox.Show(" Valoare minima mai mare decat valoare maxima");
                    return;
                }

                for (decimal i = txtMinInterval.Value; i <= txtMaxInterval.Value; i=i+2)
                {
                    PersoanaIMO tmp = new PersoanaIMO();

                    tmp.ExemplarImpar = Convert.ToInt32(i);
                    k = Convert.ToInt64(muncitor.Cod) * 1000;
                    j =  k+ tmp.ExemplarImpar;
                    tmp.CodImpar = j.ToString();

                        tmp.ExemplarPar = Convert.ToInt32(i + 1);

                        j = k + tmp.ExemplarPar;
                        tmp.CodPar = j.ToString();

                    tmp.Nume = muncitor.Nume;
                    tmp.Prenume = muncitor.Prenume;
                    tmp.Numar = muncitor.Numar;
                    tmp.Firma = muncitor.Firma;
                    j++;
                    muncitori.Add(tmp);
                }
                BarCodeMuncitor.Muncitor = muncitori;

                ReportForm frm = new ReportForm("Rapoarte/GenerareBarCode.aspx", this.Text);
                frm.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }