public static dynamic DeleteItem(ProductsOrderDetail dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_ProductsOrderDetail", new string[] { "@flag", "@Id" }, new object[] { "DeleteItem", dto.Id }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }
public static dynamic SaveItem(ProductsOrderDetail dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_ProductsOrderDetail", new string[] { "@flag", "@Id", "@ProductOrderId", "@ProductId", "@Name", "@Price", "@Quantity", "@Unit" }, new object[] { "SaveItem", dto.Id, dto.ProductOrderId, dto.ProductId, dto.Name, dto.Price, dto.Quantity, dto.Unit }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }