public void InvocarServicio() { //TipDoc = "BL"; TransDepotDA da = new TransDepotDA(); SenderID = "AS400"; //ReferenceNumber = "MAEU606882013"; RequestEquipmentLocation request = new RequestEquipmentLocation(); request.SenderID = SenderID; request.ReferenceNumber = ReferenceNumber; var responseProxy = new TransDepotProxy().ConsultarUbicacion(request); if (responseProxy.isValid) { if (responseProxy.data.Count > 0) { var ubic = da.ObtenerConteneoresTDepotLlenos(ReferenceNumber); if (ubic.Count > 0) { foreach (var u in ubic) { if (u.Ubicacion.Equals("NoLocation")) { responseProxy.data.Add(new Ubicaciones() { EquipmentNumber = u.Contenedor, Location = u.Ubicacion, NumberOfMoves = 0 }); } } } foreach (var item in responseProxy.data) { if (!item.Location.Equals("OnTruck") && !item.Location.Trim().Equals("Out")) { string sigla = item.EquipmentNumber.Substring(0, 4); string serie = item.EquipmentNumber.Substring(4, 7); da.grabarUbicaciones(TipDoc, ReferenceNumber, sigla, serie, item.Location, item.NumberOfMoves + 1); } } } } }
public void ObtenerDatosTransDepot() { List <UbicacionContenedor> lista = da.ObtenerConteneoresTDepotLlenos(); decimal fultac = 0; decimal hultac = 0; string fecha = DateTime.Now.ToString().Substring(0, 10); string hora = DateTime.Now.ToString().Substring(11, 8); //fultac = Convert.ToDecimal(); string[] x = fecha.Split('/'); string[] y = hora.Split(':'); fultac = Convert.ToDecimal(x[2] + x[1] + x[0]); hultac = Convert.ToDecimal(y[0] + y[1] + y[2]); foreach (UbicacionContenedor cnt in lista) { da.grabarUbicacionesLlenos(cnt, fultac, hultac); } }