Esempio n. 1
0
 // GET: Products
 public JsonResult Index()
 {
     return(Json(
                SQLConnectionHandler.GetInstance()
                .Execute(SQLCommand.SelectAllProducts()).GetResult(),
                JsonRequestBehavior.AllowGet
                ));
 }
Esempio n. 2
0
 public bool Insert(Employee employee)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertEmployee(employee), true);
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertEmployeesList(employee), true);
     return(true);
 }
 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);
 }
Esempio 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);
 }
Esempio n. 8
0
 public bool Delete(Employee employee)
 {
     if (employee.Id < 0)
     {
         return(false);
     }
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.DeleteEmployee(employee), true);
     return(true);
 }
Esempio 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);
 }
Esempio 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);
 }
Esempio 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);
        }
 public bool Insert(Supplier supplier)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertSupplier(supplier), true);
     return(true);
 }
Esempio n. 16
0
        // GET: Auth
        public JsonResult Index()
        {
            var result = SQLConnectionHandler.GetInstance().Execute(SQLCommand.SelectTest()).GetResult();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
Esempio n. 17
0
 public JsonResult Get(int id)
 {
     return(Json(SQLConnectionHandler.GetInstance()
                 .Execute(SQLCommand.SelectTradePointRequests(id)).GetResult(), JsonRequestBehavior.AllowGet));
 }
Esempio n. 18
0
 public JsonResult Delete(int id)
 {
     return(Json(SQLConnectionHandler.GetInstance()
                 .Execute(SQLCommand.DeleteTradePointRequest(id), true).GetResult(), JsonRequestBehavior.AllowGet));
 }
Esempio 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);
 }
Esempio 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);
 }
Esempio n. 23
0
 public bool Insert(TradePointCustomer customer)
 {
     SQLConnectionHandler.GetInstance()
     .Execute(SQLCommand.InsertTradePointsCustomer(customer), true);
     return(true);
 }