コード例 #1
0
        public List<Task> GetBasketList(BasketModel basket)
        {
            XmlDocument doc = new XmlDocument();
            XDocument xDoc = XDocument.Parse(GetBasket(basket));
            List<Task> myList = new List<Task>();

            foreach (XElement element in xDoc.Descendants("inst"))
            {
                Task task = new Task();

                task.pNudocopened = element.Element("nu_doc_opened").Value;
                task.pNudoc = Convert.ToInt32(element.Element("nu_doc").Value);
                task.pNuinst = Convert.ToInt32(element.Element("nu_inst").Value);
                task.pWfp = Convert.ToInt32(element.Element("wfp").Value);
                task.pWfa = Convert.ToInt32(element.Element("wfa").Value);
                task.pNbwf = element.Element("nb_wf").Value;
                task.pE = element.Element("e").Value;
                task.pEp = element.Element("ep").Value;
                task.pFeini = element.Element("fe_ini").Value;
                task.pTxobserva = element.Element("txobserva").Value;
                task.pDetalle = element.Element("detalle").Value;
                task.pDias = element.Element("dias").Value;
                task.pTiempo = element.Element("tiempo").Value;
                task.pRetraso = element.Element("retraso").Value;
                task.pOrigen = element.Element("origen").Value;
                task.pNbpuesto = element.Element("nb_puesto").Value;
                task.pNbpersona = element.Element("nb_persona").Value;
                task.pAlerta = Convert.ToInt32(element.Element("alerta").Value);
                task.pSemaforo = element.Element("semaforo").IsEmpty ? -1 : Convert.ToInt32(element.Element("semaforo").Value);

                task.pInespera = element.Element("in_espera") == null ? "" : element.Element("in_espera").Value;
                task.pInUrgente = element.Element("in_urgente") == null ? "" : element.Element("in_urgente").Value;
                task.pFever = element.Element("fever") == null ? "" : element.Element("fever").Value;
                task.pFrmn = element.Element("frmn") == null ? -1 : Convert.ToInt32(element.Element("frmn").Value);

                task.pNb_puesto_destino = element.Element("nb_puesto_destino") == null ? "" : element.Element("nb_puesto_destino").Value;
                task.pNb_persona_destino = element.Element("nb_persona_destino") == null ? "" : element.Element("nb_persona_destino").Value;
                task.pIn_clone = element.Element("in_clone") == null ? "" : element.Element("in_clone").Value;
                task.pDestino = element.Element("destino") == null ? "" : element.Element("destino").Value;
                task.pTp_inst = element.Element("tp_inst") == null ? "" : element.Element("tp_inst").Value;
                task.pWfc = element.Element("wfc") == null ? -1 : Convert.ToInt32(element.Element("wfc").Value);
                task.pTp_c = element.Element("tp_c") == null ? "" : element.Element("tp_c").Value;

                myList.Add(task);
            }

            return myList;
        }
コード例 #2
0
 //Manejo de Cesta
 public string GetBasket(BasketModel bm)
 {
     string message = null;
     message = Engine.p4bObtenerCesta(bm.type,
         bm.from,
         bm.docNumber,
         bm.wfParent,
         bm.wfChild,
         bm.dateStart,
         bm.dateEnd,
         bm.detail);
     Log("GetBasket", message);
     return message;
 }