private void btnRaportMuncitor_Click(object sender, EventArgs e) { ManagerRaport m = null; try { m = new ManagerRaport(); if (scanareCurenta == null) { return; } else { raportMuncitori = m.RaportMuncitori(scanareCurenta.Nume, scanareCurenta.Prenume, txtDataStart.Value, txtDataEnd.Value); } RaportMuncitor.Muncitor = raportMuncitori; //IList<RaportCumulatMuncitorIMO> list = new List<RaportCumulatMuncitorIMO>(); //foreach (RaportMuncitorIMO i in raportMuncitori) //{ // foreach (RaportDataIMO d in i.DataScanare) // { // foreach (RaportDetaliiMuncitorIMO det in d.Detalii) // { // list.Add(new RaportCumulatMuncitorIMO(i, d, det)); // } // } //} ReportForm frm = new ReportForm("Rapoarte/RaportCules.aspx", this.Text); frm.ShowDialog(); } catch (Exception ex) { throw ex; } }
private void btnRaportAmbalaje_Click(object sender, EventArgs e) { ManagerRaport m = null; try { m = new ManagerRaport(); if (scanareCurenta == null) { return; } else { //raportAmbalaje = scanari; } RaportAmbalajeR.Scanari = scanari; IList<RaportCumulatMuncitorIMO> list = new List<RaportCumulatMuncitorIMO>(); foreach (ScanareIMO i in scanari) { foreach (ScanareDetaliiIMO d in i.Detalii) { //foreach (RaportDetaliiMuncitorIMO det in d.Detalii) //{ list.Add(new RaportCumulatMuncitorIMO(i, d)); //} } } ReportForm frm = new ReportForm("Rapoarte/RaportAmbalaje.aspx", this.Text); frm.ShowDialog(); } catch (Exception ex) { throw ex; } }
private void btnRaportSefiEchipa_Click(object sender, EventArgs e) { ManagerRaport m = null; IList<RaportCumulatMuncitorIMO> list = null; try { m = new ManagerRaport(); if (scanareCurenta == null) { return; } else { list = m.RaportSefiEchipa((cmbFirme.SelectedItem as Firma).Id, cmbSefiEchipa.Text == "Toti sefi echipa" ? 0 : (cmbSefiEchipa.SelectedItem as PersoanaIMO).Id, txtDataStart.Value, txtDataEnd.Value); //raportMuncitori = m.RaportTotalMuncitori(txtDataStart.Value, txtDataEnd.Value); } RaportSefiEchipaR.SefiEchipa = list; //foreach (ScanareIMO i in scanari) //{ // foreach (ScanareDetaliiIMO d in i.Detalii) // { // //foreach (RaportDetaliiMuncitorIMO det in d.Detalii) // //{ // list.Add(new RaportCumulatMuncitorIMO(i, d)); // //} // } //} ReportForm frm = new ReportForm("Rapoarte/RaportSefiEchipa.aspx", this.Text); frm.ShowDialog(); } catch (Exception ex) { throw ex; } }
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); } }