在像asp.net中的excel这样的gridview中进行计算 [英] calculation in a gridview like excel in asp.net

查看:91
本文介绍了在像asp.net中的excel这样的gridview中进行计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我该怎么做.

1)创建一个销售屏幕以生成发票
2)产品将显示在下拉列表中
3)当用户选择一种产品并单击添加产品"时,相应的产品名称和价格将显示在网格中的产品和价格"列中
4)用户将能够修改数量列
5)修改数量列后,行总计和总计将被更改
6)最后会有一个文本框可提供折扣
7)当用户单击添加产品"按钮,新行将添加到带有SL#,产品名称,价格,数量文本框和项目总计标签的网格中
8)单击确认销售"按钮将从表格中扣除数量,并在提供发票ID的单独表格中更新详细信息.
9)在确认页面中,将有一个打印发票的链接


SL#产品价格数量数量项目总计
1可口可乐90 5 450
2饭50 10 500
3笔15 2 30

总计980
优惠10
发票总额970

数据库名称OurCompany
表名称产品

SL#ColumnName数据类型描述
1个ProductID自动编号自动分配给新产品的编号
2 ProductName文本(40)产品名称
3 QuantityPerUnit Text(20)(例如24计数箱,1升瓶).
4 ReorderLevel整数需保持库存的最小单位
5停产是/否是意味着该项目不再可用
6 UnitBuyPrice货币每单位购买价格.
7 UnitSellPrice货币单位价格出售.
8 UnitsInStock整数库存数量.

表名称客户

SL#ColumnName数据类型描述
1个CustomerID自动编号自动分配给新客户的编号
2名称文字(40)客户名称
3地址文本(200)客户的地址
4手机短信(20)客户的手机号码


表名称顺序

SL#ColumnName数据类型描述
1个OrderID自动编号自动分配给新订单的编号
2 OrderDate DateTime订购日期
3客户编号参考客户表
4总数量总订单金额
5折扣编号折扣金额
6 TotalAfterDiscount数量折扣后的总数

表名称OrderDetails

SL#ColumnName数据类型描述
1 OrderID编号对订单"表的引用
2产品编号参考产品表
3 Quantity Int按此顺序出售的数量
4单价编号产品价格

Please help me how can i do this.

1) Create one sales screen to produce invoice
2) Product will be displayed in the dropdown list
3) When the user select a product and click "Add Product", the corresponding product name & price will be displayed in Product & Price column in the grid
4) User will have ability to modify quantity column
5) Upon modificatoin of quantity column, row total & gross total will be changed
6) Finally one text box will be there to give discount
7) when user click on "Add Product" button and new row will be added to the Grid with SL#, Product name, Price, quantity text box and item total label
8) Clicking on the "Confirm Sale" button will deduct the quantity from table and update the details in a separate table in giving an invoice id.
9) In confirmation page there will be a link to print the invoice


SL# Product Price Quantity Item Total
1 Coca Cola 90 5 450
2 Rice 50 10 500
3 Pen 15 2 30

Gross Total 980
Discount 10
Invoice Total 970

Database Name OurCompany
Table Name Product

SL# ColumnName DataType Description
1 ProductID AutoNumber Number automatically assigned to new product
2 ProductName Text(40) Name of the product
3 QuantityPerUnit Text(20) (e.g., 24-count case, 1-liter bottle).
4 ReorderLevel Integer Minimum units to maintain in stock
5 Discontinued Yes/No Yes means item is no longer available
6 UnitBuyPrice Currency Buy Price per unit.
7 UnitSellPrice Currency Sell Price per unit.
8 UnitsInStock Integer Number of units in stock.

Table Name Customer

SL# ColumnName DataType Description
1 CustomerID AutoNumber Number automatically assigned to new customer
2 Name Text(40) Name of the customer
3 Address Text(200) Address of the customer
4 Mobile Text(20) Mobile number of the customre


Table Name Orders

SL# ColumnName DataType Description
1 OrderID AutoNumber Number automatically assigned to new order
2 OrderDate DateTime Order Date
3 CustomerID Number Reference to Customer Table
4 Total Number Total Order amount
5 Discount Number Discount amount
6 TotalAfterDiscount Number Total after discount

Table Name OrderDetails

SL# ColumnName DataType Description
1 OrderID Number Reference to Orders table
2 ProductID Number Reference to Product Table
3 Quantity Int Quantity sold in this order
4 UnitPrice Number Price of product

推荐答案

您已经放弃了分配要求.您已经尝试了什么?
我会提示您,您将需要一些JQUERY(javascript)才能实现此目的.如果完全是客户端,那么就足够了,但是您可能还需要在服务器端创建一些HANDLERS来进行一些处理.
You''ve dumped your assignment requirements. What have you tried already?
I would provide you a hint that you will require some JQUERY(javascript) to achieve this. If it is entirely client side, then that will suffice, but you may also need to create some HANDLERS on the server side to do some processing.


这篇关于在像asp.net中的excel这样的gridview中进行计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆