Ejemplo n.º 1
0
        private void button7_Click(object sender, EventArgs e)
        {
            Services.CrearFacturasContadoRequest wCrearFacturasContadoRequest = (Services.CrearFacturasContadoRequest)
                                                                                helper.SerializationFunctions.DeserializeFromXml(typeof(Services.CrearFacturasContadoRequest),
                                                                                                                                 txtCollection.Text);

            MessageBox.Show(wCrearFacturasContadoRequest.GetBusinessDataXml(), "wCrearFacturasContadoRequest.GetXml()");

            String Str = helper.SerializationFunctions.SerializeToXml(wCrearFacturasContadoRequest);

            MessageBox.Show(Str);
        }
Ejemplo n.º 2
0
        private void button5_Click(object sender, EventArgs e)
        {
            Services.CrearFacturasContadoRequest req = new Services.CrearFacturasContadoRequest();

            #region Set Entity
            Services.FacturaBE wFacturaBE = req.BusinessData.FacturaBE;



            Services.ItemCollectionBE wItemCollectionBE = new Services.ItemCollectionBE();

            Services.ItemBE wItemBE = new Services.ItemBE();
            wItemBE.Cantidad    = 100;
            wItemBE.Descripcion = "Manzanas";
            wItemCollectionBE.Add(wItemBE);

            wItemBE             = new Services.ItemBE();
            wItemBE.Cantidad    = 34200;
            wItemBE.Descripcion = "Peras";

            wItemCollectionBE.Add(wItemBE);

            wFacturaBE.NombreCliente    = "Marcelo";
            wFacturaBE.NumeroCliente    = 90000;
            wFacturaBE.FechaFactura     = System.DateTime.Now;
            wFacturaBE.ItemCollectionBE = wItemCollectionBE;

            #endregion

            #region (Context)
            //Services.CrearFacturasContadoRequest
            Fwk.Bases.ContextInformation wContext = new Fwk.Bases.ContextInformation();

            wContext.HostName   = Environment.MachineName;
            wContext.UserId     = Environment.UserName;
            wContext.ServerTime = System.DateTime.Now;

            req.ContextInformation = wContext;
            #endregion

            txtEntidadSimple.Text = wFacturaBE.GetXml();

            label1.Text = "xml del request";
            //txtCollection.Text = Fwk.HelperFunctions.SerializationFunctions.SerializeToXml(req);
            txtCollection.Text = req.GetXml();
        }
Ejemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            Services.CrearFacturasContadoRequest req = new Services.CrearFacturasContadoRequest();

            Services.FacturaBE wFacturaBE = req.BusinessData.FacturaBE;

            Services.ItemCollectionBE wItemCollectionBE = new Services.ItemCollectionBE();

            Services.ItemBE wItemBE = new Services.ItemBE();
            wItemBE.Cantidad = 100;
            wItemBE.Descripcion = "Manzanas";
            wItemCollectionBE.Add(wItemBE);

            wItemBE = new Services.ItemBE();
            wItemBE.Cantidad = 34200;
            wItemBE.Descripcion = "Peras";

            wItemCollectionBE.Add(wItemBE);

            wFacturaBE.NombreCliente = "Marcelo";
            wFacturaBE.NumeroCliente = 90000;
            wFacturaBE.FechaFactura = System.DateTime.Now;
            wFacturaBE.ItemCollectionBE = wItemCollectionBE;

            #region (Context)
            //Services.CrearFacturasContadoRequest
            Fwk.Bases.ContextInformation wContext = new Fwk.Bases.ContextInformation();

            wContext.HostName = Environment.MachineName;
            wContext.UserId = Environment.UserName;
            wContext.HostTime = System.DateTime.Now;

            req.ContextInformation = wContext;
            #endregion

            txtEntidadSimple.Text = wFacturaBE.GetXml();

            label1.Text = "xml del request";
            txtCollection.Text = req.GetXml();
            
        }