Beispiel #1
0
        private void bg_DoWork(object sender, DoWorkEventArgs e)
        {
            totalEmpleadosProcesar = datos.Sum(s => s.EuidSplit);

            foreach (var item in datos)
            {
                var num = InfoFieldBookBusiness.GetSecuenciaIndEuid(item.Euid);

                if (num.IsNumeric())
                {
                    EntryListDto row   = new EntryListDto();
                    int          index = int.Parse(num);

                    for (int i = 1; i <= item.EuidSplit; i++)
                    {
                        itemO = EntryListBusiness.GetEntryList(item.Euid, "Euid")[0];
                        if (itemO != null)
                        {
                            row.Index          = i;
                            row.Euid           = item.Euid;
                            row.IndEuid        = item.Euid + "_" + index.ToString();
                            row.Year           = itemO.Year;
                            row.Country        = itemO.Country;
                            row.Location       = itemO.Location;
                            row.Rng            = itemO.Rng;
                            row.Plt            = itemO.Plt;
                            row.Ent            = itemO.Ent;
                            row.ExpName        = itemO.ExpName;
                            row.ProjectLead    = itemO.ProjectLead;
                            row.Cc             = itemO.Cc;
                            row.Crop           = itemO.Crop;
                            row.Obs            = itemO.Obs;
                            row.ProjectCode    = itemO.ProjectCode;
                            row.GmoEvent       = itemO.GmoEvent;
                            row.Sag            = itemO.Sag;
                            row.CodInternacion = itemO.CodInternacion;
                            row.CodReception   = itemO.CodReception;
                            row.Client         = itemO.Client;
                            row.EntName        = itemO.EntName;
                            row.EntRole        = itemO.EntRole;
                            row.ResImportacion = itemO.ResImportacion;
                            row.GranosHilera   = itemO.GranosHilera;
                            row.Bi1            = itemO.Bi1;
                            row.Bi2            = itemO.Bi2;
                            row.Bi3            = itemO.Bi3;
                            row.Bi4            = itemO.Bi4;
                            row.Owner          = itemO.Owner;
                            row.CodPermanencia = itemO.CodPermanencia;
                            row.LotId          = itemO.LotId;

                            listData.Add(row);
                            index++;
                            row = new EntryListDto();
                        }

                        progreso++;                                                                                  //Aumentando el progreso
                        porciento = Convert.ToInt16((((double)progreso / (double)totalEmpleadosProcesar) * 100.00)); //Calculo del porcentaje
                        bg.ReportProgress(porciento);
                    }
                }
            }
        }
Beispiel #2
0
 private void LlenaGrillaEntry(string valor)
 {
     entryList = EntryListBusiness.GetEntryList(valor, opcion);
 }