Exemplo n.º 1
0
 // GET: Products
 public JsonResult Index()
 {
     return(Json(
                SQLConnectionHandler.GetInstance()
                .Execute(SQLCommand.SelectAllProducts()).GetResult(),
                JsonRequestBehavior.AllowGet
                ));
 }
Exemplo n.º 2
0
 public bool Insert(Employee employee)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertEmployee(employee), true);
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertEmployeesList(employee), true);
     return(true);
 }
Exemplo n.º 3
0
 public bool Update(Order order)
 {
     if (order.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.UpdateOrder(order), true);
     return(true);
 }
 public bool Update(TradePointSale sale)
 {
     if (sale.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.UpdateTradePointSale(sale), true);
     return(true);
 }
Exemplo n.º 5
0
 public bool Insert(TradePointPayment payment)
 {
     if (payment.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertTradePointPayment(payment), true);
     return(true);
 }
 public bool Delete(ObjectRelation relation)
 {
     if (relation.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.DeleteObjectsRelations(relation), true);
     return(true);
 }
 public bool Update(Supplier supplier)
 {
     if (supplier.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.UpdateSupplier(supplier), true);
     return(true);
 }
Exemplo n.º 8
0
 public bool Delete(Employee employee)
 {
     if (employee.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.DeleteEmployee(employee), true);
     return(true);
 }
Exemplo n.º 9
0
 public bool Update(TradePointRequest request)
 {
     if (request.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.UpdateTradePointRequest(request), true);
     return(true);
 }
 public bool Delete(TradePointType type)
 {
     if (type.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.DeleteTradePointType(type), true);
     return(true);
 }
Exemplo n.º 11
0
 public bool Update(TradePointCustomer customer)
 {
     if (customer.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.UpdateTradePointsCustomer(customer), true);
     return(true);
 }
 public bool Delete(TradePoint point)
 {
     if (point.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.DeleteTradePoint(point), true);
     return(true);
 }
 public bool Update(TradePointProduct product)
 {
     if (product.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.UpdateTradePointProduct(product), true);
     return(true);
 }
Exemplo n.º 14
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            OracleConnection conn = DBUtils.GetDBConnection();

            try
            {
                conn.Open();
            }
            catch (Exception ex)
            {
                return;
            }

            SQLConnectionHandler.GetInstance().SetConnection(conn);
        }
Exemplo n.º 15
0
 public bool Insert(Supplier supplier)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertSupplier(supplier), true);
     return(true);
 }
Exemplo n.º 16
0
        // GET: Auth
        public JsonResult Index()
        {
            var result = SQLConnectionHandler.GetInstance().Execute(SQLCommand.SelectTest()).GetResult();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 17
0
 public JsonResult Get(int id)
 {
     return(Json(SQLConnectionHandler.GetInstance()
                 .Execute(SQLCommand.SelectTradePointRequests(id)).GetResult(), JsonRequestBehavior.AllowGet));
 }
Exemplo n.º 18
0
 public JsonResult Delete(int id)
 {
     return(Json(SQLConnectionHandler.GetInstance()
                 .Execute(SQLCommand.DeleteTradePointRequest(id), true).GetResult(), JsonRequestBehavior.AllowGet));
 }
Exemplo n.º 19
0
 public bool Insert(Order order)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertOrder(order), true);
     return(true);
 }
 public bool Insert(ObjectRelation relation)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertObjectsRelations(relation), true);
     return(true);
 }
Exemplo n.º 21
0
 public bool Insert(Product product)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertProduct(product), true);
     return(true);
 }
 public bool Insert(TradePoint point)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertTradePoint(point), true);
     return(true);
 }
Exemplo n.º 23
0
 public bool Insert(TradePointCustomer customer)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertTradePointsCustomer(customer), true);
     return(true);
 }