Exemplo n.º 1
0
        public DataTable RunImportProccess(ViewModelImportInfo viewmodelImport)
        {
            clsDataAcces controldata = new clsDataAcces();

            GPdataaccess data = new GPdataaccess();

            this.IDCarga   = viewmodelImport.iIDCarga;
            this.CompanyID = viewmodelImport.iCompanyID;
            this.Chequera  = viewmodelImport.sChequera;
            this.webSrvGP  = new WebServiceManager(viewmodelImport.UserId,
                                                   viewmodelImport.Password, viewmodelImport.Dominio,
                                                   viewmodelImport.Url, data.GPHNCARGAR(), data.SITINTEGRATION());
            int ID = viewmodelImport.iIDCarga;

            try
            {
                //no problema
                //this.tblCarga = this.cData.GetTblCarga(ID);
                this.tblCarga = controldata.GetTblCarga(ID);
                return(this.tblCarga);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public DataTable GetSalesList(int iIDCarga)
        {
            clsDataAcces controldata = new clsDataAcces();

            //    this.tblVenta = this.cData.GetVentasList(iIDCarga);
            this.tblVenta = controldata.GetVentasList(iIDCarga);
            return(this.tblVenta);
        }
Exemplo n.º 3
0
 public WebServiceManager(string sUserId, string sPassword, string sDomainName, string sUrl, string ParamConnGP, string ParamConnIntDB)
 {
     try
     {
         // this.cData = new clsDataAcces(ParamConnIntDB, ParamConnGP);
         this.cData = new clsDataAcces();
         this.sConn = ParamConnGP;
     }
     catch (Exception ex)
     {
         StringBuilder stringBuilder = new StringBuilder("No fue posible establecer conexion con el servicio web.  ");
         stringBuilder.AppendLine(ex.Message);
         throw new Exception(stringBuilder.ToString());
     }
 }
Exemplo n.º 4
0
        public string SaleProcess(int iIDVenta, int xPos)
        {
            clsDataAcces controldata = new clsDataAcces();
            //El idventa vuelve a 0
            //int IdVenta=0;
            string docs;

            try
            {
                //Id Venta es asignado otra vez esta logica es del programa creado por SITCORP
                //IdVenta = iIDVenta;

                //Retorna un datatable con el select siguiente SELECT * FROM TransaccionVentaItem WHERE IDVenta = @IDVenta
                //El cual resive un parametro que es el id de venta
                //** this.tblItems = this.cData.GetVentaItemById(iIDVenta);
                //ppp
                this.tblItems = controldata.GetVentaItemById(iIDVenta);
                //crear el documento para pasar a gp
                //pasa 6 paramaetros
                // CompanyID=id de la compania
                //tblVenta=tabla TRANSACCIONVENTA HEADER
                //"eS-ES" PARAMETRO DE LENGUAJE
                //NUMERO DE FILAS
                //tblItems=TRANSACCIONVENTAEL DETAIL
                docs = this.webSrvGP.CreateDocs(this.CompanyID, this.tblVenta, "es-ES", xPos, this.tblItems, this.Chequera);
                if (docs != "")
                {
                    controldata.UpdateVentaSetEstatus(iIDVenta, "P", docs);
                }
                else
                {
                    controldata.UpdateVentaSetEstatus(iIDVenta, "P", "");
                }
            }
            catch (Exception ex)
            {
                controldata.UpdateVentaSetEstatus(iIDVenta, "E", ex.Message.ToString());
                docs = ex.Message.ToString();
            }
            return(docs);
        }
Exemplo n.º 5
0
 public WebServiceManager(string ParamConnGP, string ParamConnIntDB)
 {
     this.sConn = ParamConnGP;
     //  this.cData = new clsDataAcces(ParamConnIntDB, ParamConnGP);
     this.cData = new clsDataAcces();
 }