mahsa.n
جمعه 19 شهریور 1389, 22:23 عصر
سلام به دوستان
من از این کد برای اضافه کردن کالا استفاده میکنم
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"
DataKeyNames="SerialNum"DataSourceID="SqlDataSource1"
OnRowCommand="Insert"
<Columns>
<asp:BoundFieldDataField="SerialNum"HeaderText="شماره سریال"ReadOnly="True"
SortExpression="SerialNum"/>
<asp:BoundFieldDataField="Price"HeaderText="قیمت"SortExpression="Price"/>
<asp:BoundFieldDataField="Tedad"HeaderText="تعداد"SortExpression="Tedad"/>
<asp:BoundFieldDataField="Date"HeaderText="تاریخ ثبت"SortExpression="Date"/>
<asp:BoundFieldDataField="Name"HeaderText="نام"SortExpression="Name"/>
<asp:ButtonFieldButtonType="Button"Text="اضافه کردن به سبد خرید"CommandName="Insert"/>
</Columns>
من از این کد برای اضافه کردن کالا استفاده میکنم
<asp:GridViewID="GridView1"runat="server"AutoGenerateColumns="False"
DataKeyNames="SerialNum"DataSourceID="SqlDataSource1"
OnRowCommand="Insert"
<Columns>
<asp:BoundFieldDataField="SerialNum"HeaderText="شماره سریال"ReadOnly="True"
SortExpression="SerialNum"/>
<asp:BoundFieldDataField="Price"HeaderText="قیمت"SortExpression="Price"/>
<asp:BoundFieldDataField="Tedad"HeaderText="تعداد"SortExpression="Tedad"/>
<asp:BoundFieldDataField="Date"HeaderText="تاریخ ثبت"SortExpression="Date"/>
<asp:BoundFieldDataField="Name"HeaderText="نام"SortExpression="Name"/>
<asp:ButtonFieldButtonType="Button"Text="اضافه کردن به سبد خرید"CommandName="Insert"/>
</Columns>