Example #1
0
        public JsonResult ReadPorductById(int id)
        {
            var productService = new eSalesService.ProductService(this.GetDBConnectionString());

            var data = productService.GetProductById(id);

            return(this.Json(data, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public JsonResult GetProductNameList()
        {
            var productService = new eSalesService.ProductService(this.GetDBConnectionString());
            var store          = new eSaleModel.Store();

            store.identifier = "id";
            store.items      = productService.GetProductNameList();

            return(this.Json(store, JsonRequestBehavior.AllowGet));
        }
Example #3
0
        public JsonResult GetProductList()
        {
            var result         = new eSaleModel.Product();
            var productService = new eSalesService.ProductService(this.GetDBConnectionString());
            var store          = new eSaleModel.Store();

            result.ProductId   = 0;
            result.ProductName = "%" + null + "%";
            result.SupplierId  = 0;
            result.CategoryId  = 0;

            return(this.Json(productService.GetProductByCondition(result), JsonRequestBehavior.AllowGet));
        }
Example #4
0
        public JsonResult GetInsertRow()
        {
            List <eSaleModel.Product> item = new List <eSaleModel.Product>();
            var productService             = new eSalesService.ProductService(this.GetDBConnectionString());
            var store = new eSaleModel.Store();


            item.Add(new eSaleModel.Product()
            {
                ProductName = "Product HHYDP",
                UnitPrice   = (decimal)18.00,
                ProductId   = 1,
                Count       = 1,
                Sum         = 1
            });


            store.identifier = "ProductId";
            store.items      = item;
            return(this.Json(store, JsonRequestBehavior.AllowGet));
        }