Example #1
0
        public async Task <IHttpActionResult> Eliminar(int Id, int IdCliente, string UsrModificador)
        {
            try
            {
                TiendaBL oTiendaBL = new TiendaBL(IdCliente);
                TiendaBE obe       = new TiendaBE();
                obe.Id             = Id;
                obe.UsrModificador = UsrModificador;
                bool rpta = false;
                rpta = oTiendaBL.Eliminar(obe);

                if (rpta)
                {
                    return(Ok(Models.Util.GetBodyResponse(200, "OK")));
                }
                else
                {
                    return(Ok(Models.Util.GetBodyResponse(300, "OcurriĆ³ un error al actualizar.")));
                }
            }
            catch (Exception ex)
            {
                //LogSA.GrabarLogError("SOL TR", model.user, "EditarTareas", ex);
                return(Ok(Models.Util.GetBodyResponse(400, ex.Message)));
            }
        }
Example #2
0
        // GET: Home
        public ActionResult Index()
        {
            var TiendaBL      = new TiendaBL();
            var listadeTienda = TiendaBL.ObtenerTienda();

            ViewBag.adminwebsiteurl = ConfigurationManager.AppSettings["adminwebsiteurl"];

            return(View(listadeTienda));
        }
Example #3
0
        public IHttpActionResult GetDatosIniciales(string usuario, int idCliente)
        {
            try
            {
                TiendaBL oTiendaBL           = new TiendaBL(idCliente);
                Tienda_DatosInicialesBE lobe = oTiendaBL.ListarDatosIniciales(usuario, idCliente);

                if (lobe != null)
                {
                    return(Ok(Models.Util.GetBodyResponse(200, lobe)));
                }
                else
                {
                    return(Ok(Models.Util.GetBodyResponse(300, "No se encontraron registros.")));
                }
            }
            catch (Exception ex)
            {
                /*LogSA.GrabarLogError("SOL TR", user, "GetListarOrdOtrs", ex);*/
                return(Ok(Models.Util.GetBodyResponse(400, ex.Message)));
            }
        }
Example #4
0
        public async Task <IHttpActionResult> Actualizar(TiendaBE obe)
        {
            try
            {
                TiendaBL oTiendaBL = new TiendaBL(obe.IdCliente);
                bool     rpta      = false;
                rpta = oTiendaBL.Actualizar(obe);

                if (rpta)
                {
                    return(Ok(Models.Util.GetBodyResponse(200, "OK")));
                }
                else
                {
                    return(Ok(Models.Util.GetBodyResponse(300, "OcurriĆ³ un error al actualizar.")));
                }
            }
            catch (Exception ex)
            {
                //LogSA.GrabarLogError("SOL TR", model.user, "EditarTareas", ex);
                return(Ok(Models.Util.GetBodyResponse(400, ex.Message)));
            }
        }
Example #5
0
 public TiendaController()
 {
     _db = new DapperConnector();
     _bl = new TiendaBL(_db);
 }
Example #6
0
 public OrdenDetalleController()
 {
     _ordenBL  = new OrdenesBL();
     _tiendaBL = new TiendaBL();
 }
Example #7
0
 public TiendaController()
 {
     _tiendaBL    = new TiendaBL();
     _categoriaBL = new CategoriaBL();
 }