Ejemplo n.º 1
0
        public static List <DO_SIM> GetAllSIM(string fechaInicial, string fechaFinal)
        {
            SO_Sim sO_Sim = new SO_Sim();

            List <DO_SIM> ListaResultante = new List <DO_SIM>();

            DataSet informacionBD = sO_Sim.GetAll(fechaInicial, fechaFinal);

            if (informacionBD != null)
            {
                if (informacionBD.Tables.Count > 0 && informacionBD.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow item in informacionBD.Tables[0].Rows)
                    {
                        DO_SIM dO_SIM = new DO_SIM();
                        dO_SIM.ID_SIM   = Convert.ToInt32(item["ID_SIMS"].ToString());
                        dO_SIM.SIM      = item["SIM"].ToString();
                        dO_SIM.operador = GetGerente((int)item["ID_OPERADOR"]);
                        if (!string.IsNullOrEmpty(item["ID_SIM_GERENTE"].ToString()))
                        {
                            dO_SIM.gerente        = GetGerente((int)item["ID_GERENTE"]);
                            dO_SIM.FechaSolicitud = Convert.ToDateTime(item["FECHA_SOLICITUD"].ToString());
                            dO_SIM.FechaEntrega   = Convert.ToDateTime(item["FECHA_ENTREGA"].ToString());
                        }


                        ListaResultante.Add(dO_SIM);
                    }
                }
            }

            return(ListaResultante);
        }