Ejemplo n.º 1
0
        public BE_Json CreateInvoice([FromBody] VE_Invoice _VeInvoice)
        {
            //BL_Invoice _blInvoice = new BL_Invoice();
            //_blInvoice.connectionString = AppConfig.DbConnection;
            //return _blInvoice.CreateInvoice(_VeInvoice);

            BE_Json objJson     = null;
            var     objListaAux = string.Empty;

            if (_VeInvoice == null)
            {
                return(objJson);
            }

            try
            {
                BL_Invoice _blInvoice = new BL_Invoice();
                _blInvoice.connectionString = AppConfig.DbConnection;
                objListaAux = JsonConvert.SerializeObject(_blInvoice.CreateInvoice(_VeInvoice));

                objJson        = new BE_Json();
                objJson.data   = objListaAux;
                objJson.status = CManager.RESULTADO_WCF.OK;
            }
            catch (Exception ex)
            {
                objJson        = new BE_Json();
                objJson.data   = "Hubo en error en servidor:" + ex.Message + ";" + ex.StackTrace + ";" + ex.ToString();
                objJson.status = CManager.RESULTADO_WCF.ERROR;
                objJson.status = CManager.RESULTADO_WCF.ERROR;
            }
            finally
            {
                objListaAux = null;
            }
            return(objJson);
        }