コード例 #1
0
ファイル: PersoaneUC.cs プロジェクト: adahera222/_curat_
 private void bindingSource1_PositionChanged(object sender, EventArgs e)
 {
     if (bindingSource1.Current != null)
     {
         persoanaCurenta = bindingSource1.Current as PersoanaIMO;
     }
     else
     {
         persoanaCurenta = null;
     }
 }
コード例 #2
0
ファイル: PrintForm.cs プロジェクト: adahera222/_curat_
        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();
        }
コード例 #3
0
ファイル: BarCodeMuncitor.cs プロジェクト: adahera222/_curat_
 public BarCodeMuncitor(PersoanaIMO muncitor)
 {
     InitializeComponent();
     bindingSource1.DataSource = muncitor;
 }
コード例 #4
0
ファイル: PrintForm.cs プロジェクト: adahera222/_curat_
        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);
            }
        }