00001: Imports System.Data.SqlClient
00002: Partial Class Page2
00003:     Inherits System.Web.UI.Page
00004: 
00005:     Dim WithEvents WorkNodes As New SH.WorkingTovarList 'корзина
00006: 
00007:     Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
00008:         If Not (Session("WorkNodes") Is Nothing) Then WorkNodes = Session("WorkNodes")
00009:     End Sub
00010: 
00011:     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
00012:         If WorkNodes.Count = 0 Then
00013:             'зашел только проверить состояние заказа
00014:             Wizard1.ActiveStepIndex = 3
00015:             Dim NetZakazov As Boolean = True
00016:             Dim ZakazSequence As String = ""
00017:             For Each X As String In Request.Cookies.AllKeys
00018:                 If X.Contains("Zakaz") Then
00019:                     'последовательность всех заказов записана в куках
00020:                     NetZakazov = False
00021:                     ZakazSequence &= " OR i=" & Request.Cookies(X).Value
00022:                 End If
00023:             Next
00024:             If NetZakazov Then
00025:                 Label7.Visible = True
00026:                 GridView1.Visible = False
00027:             Else
00028:                 SqlDataSource1.SelectCommand = "SELECT [i], [Summa], [Open], [Closed] FROM [Zakaz] " & _
00029:                 "where (" & ZakazSequence.ToString.Substring(4) & ") and UserKey='" & Request.Params("HTTP_HOST") & "' Order by i"
00030:                 GridView1.DataBind() 'GridView1 привязана на SqlDataSource1
00031:                 If GridView1.Rows.Count = 0 Then
00032:                     Label7.Visible = True
00033:                     GridView1.Visible = False
00034:                 Else
00035:                     GridView1.Visible = True
00036:                     Label7.Visible = False
00037:                 End If
00038: 
00039:             End If
00040:         Else
00041:             If Not IsPostBack Then
00042:                 'сетка с перечнем заказов
00043:                 Wizard1.ActiveStepIndex = 0
00044:                 'ручная привязка в RunTime к бизнес объекту 
00045:                 GridView2.DataSource = WorkNodes
00046:                 'Сейчас поля привязки читаются из Дизайн-тайма
00047:                 'GridView2.AutoGenerateColumns = False
00048:                 'Dim Column1 As New BoundField
00049:                 'Column1.DataField = "TovarName"
00050:                 'GridView2.Columns.Add(Column1)
00051:                 Call ReCalculate()
00052:                 GridView2.DataBind()
00053:             End If
00054:         End If
00055:     End Sub
00056: 
00057:     Private Sub ReCalculate()
00058:         Label16.Text = 0
00059:         For Each One As SH.WorkingTovar In WorkNodes
00060:             If Not One.IsHaveData Then One.ReadFromSQL()
00061:             One.RubCost = One.UsdCost * One.Kol * 30
00062:             Label16.Text = CDec(Label16.Text) + One.RubCost
00063:         Next
00064:         Label18.Text = Label16.Text
00065:     End Sub
00066: 
00067:     Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick
00068:         'это страшный глюк, но кроме как из SESSION тут у меня SqlDataSource ниоткуда параметры НЕ БЕРЕТ!
00069:         'и еще больший глюк - возвращенные Return_Value и выходные параметры НИКУДА не записывает, даже в Session
00070:         Dim CN As SqlConnection, CMD As SqlCommand
00071:         CN = New SqlConnection(ConfigurationManager.ConnectionStrings("SH_Zakaz").ConnectionString)
00072:         CN.Open()
00073:         CMD = New SqlCommand("ZakazAdd", CN)
00074:         CMD.CommandType = Data.CommandType.StoredProcedure
00075:         'все сбрасываем в таблицу Zakaz и получаем номер заказа в Session("UserID")
00076:         Dim PRM1 = New SqlParameter("@UserKey", Request.Params("HTTP_HOST")) : CMD.Parameters.Add(PRM1)
00077:         Dim PRM2 = New SqlParameter("@Summa", CType(Label16.Text, Decimal)) : CMD.Parameters.Add(PRM2)
00078:         Dim PRM3 = New SqlParameter("@Email", txEmail.Text) : CMD.Parameters.Add(PRM3)
00079:         Dim PRM4 = New SqlParameter("@Name", txName.Text) : CMD.Parameters.Add(PRM4)
00080:         Dim PRM5 = New SqlParameter("@Telefon1", txTelefon1.Text) : CMD.Parameters.Add(PRM5)
00081:         Dim PRM6 = New SqlParameter("@Telefon2", txTelefon2.Text) : CMD.Parameters.Add(PRM6)
00082:         Dim PRM7 = New SqlParameter("@Telefon3", txTelefon3.Text) : CMD.Parameters.Add(PRM7)
00083:         Dim PRM8 = New SqlParameter("@Gorod", txGorod.Text) : CMD.Parameters.Add(PRM8)
00084:         Dim PRM9 = New SqlParameter("@PostIndex", txPIndex.Text) : CMD.Parameters.Add(PRM9)
00085:         Dim PRM10 = New SqlParameter("@Ulitsa", txUlitsa.Text) : CMD.Parameters.Add(PRM10)
00086:         Dim PRM11 = New SqlParameter("@Dom", txDom.Text) : CMD.Parameters.Add(PRM11)
00087:         Dim PRM12 = New SqlParameter("@Kvart", txKvart.Text) : CMD.Parameters.Add(PRM12)
00088:         Dim PRM13 = New SqlParameter("@Domofon", txDomofon.Text) : CMD.Parameters.Add(PRM13)
00089:         Dim PRM14 = New SqlParameter("@Text", txText.Text) : CMD.Parameters.Add(PRM14)
00090:         Dim PRM15 = New SqlParameter("@Metro", Metro.SelectedValue) : CMD.Parameters.Add(PRM15)
00091:         Dim ZakazID As Integer = CMD.ExecuteScalar()
00092:         CN.Close() : CMD = Nothing : PRM1 = Nothing : PRM2 = Nothing : PRM3 = Nothing : PRM4 = Nothing : PRM5 = Nothing : PRM6 = Nothing : PRM7 = Nothing : PRM8 = Nothing : PRM9 = Nothing : PRM10 = Nothing : PRM11 = Nothing : PRM12 = Nothing : PRM13 = Nothing : PRM14 = Nothing : PRM15 = Nothing
00093:         '
00094:         'теперь запоминаем заказанный товар
00095:         Session("ToZakaz") = ZakazID
00096:         Label7.Text = "Создан новый заказ #" & ZakazID.ToString
00097:         For Each One As SH.WorkingTovar In WorkNodes
00098:             Session("ToPrice") = One.PricePosition
00099:             Session("Kol") = One.Kol
00100:             Session("Cost") = One.UsdCost
00101:             SqlDataSource4.Insert()
00102:         Next
00103:         Session("ToZakaz") = Nothing
00104:         Session("ToPrice") = Nothing
00105:         Session("Kol") = Nothing
00106:         Session("Cost") = Nothing
00107:         WorkNodes.Clear()
00108:         '
00109:         'и записываем номер заказа юзеру в куку
00110:         Dim MyCook As HttpCookie = New HttpCookie("Zakaz" & ZakazID.ToString, ZakazID)
00111:         MyCook.Expires = Now.AddYears(1)
00112:         'MyCook.Secure = True
00113:         Response.Cookies.Add(MyCook)
00114:     End Sub
00115: 
00116:     Protected Sub GridView1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.PreRender
00117:         For Each OneRow As GridViewRow In GridView1.Rows
00118:             'обрезать в деньгах лишние знаки после запятой
00119:             OneRow.Cells(1).Text = CType(OneRow.Cells(1).Text, Decimal).ToString("N2")
00120:         Next
00121:     End Sub
00122: 
00123:     'чтоб точно привязка не потерялась
00124:     Protected Sub GridView2_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView2.PreRender
00125:         'пересчет итогов
00126:         Dim All As Decimal = 0
00127:         For Each One As SH.WorkingTovar In WorkNodes
00128:             If Not One.IsHaveData Then One.ReadFromSQL()
00129:             One.RubCost = One.UsdCost * One.Kol * 30
00130:             All += One.RubCost
00131:         Next
00132:         Label16.Text = All.ToString("N2")
00133:         'поля привязки читаются из Дизайн-тайма - не забывать про задание ключей
00134:         GridView2.DataSource = WorkNodes
00135:         'ручная привязка в RunTime к бизнес объекту 
00136:         GridView2.DataBind()
00137:         For Each OneRow As GridViewRow In GridView2.Rows
00138:             OneRow.Cells(1).Text = CType(OneRow.Cells(1).Text, Decimal).ToString("N2")
00139:             OneRow.Cells(4).Text = CType(OneRow.Cells(4).Text, Decimal).ToString("N2")
00140:         Next
00141:     End Sub
00142: 
00143:     Protected Sub GridView2_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView2.RowEditing
00144:         GridView2.EditIndex = e.NewEditIndex
00145:     End Sub
00146: 
00147:     Protected Sub GridView2_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView2.RowUpdating
00148:         For Each X As Control In GridView2.Rows(GridView2.EditIndex).Cells(2).Controls
00149:             If X.GetType.Name = "TextBox" Then
00150:                 'поиск в шаблоне редактирования EditTemplate поля со значением
00151:                 WorkNodes(GridView2.EditIndex).Kol = CType(X, TextBox).Text
00152:                 GridView2.EditIndex = -1
00153:                 Exit Sub
00154:             End If
00155:         Next
00156:     End Sub
00157: 
00158:     Protected Sub Wizard1_NextButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.NextButtonClick
00159:         If e.CurrentStepIndex = 0 Then Label18.Text = Label16.Text
00160:     End Sub
00161: End Class
00001: <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Page2.aspx.vb" Inherits="Page2" title="Untitled Page" %>
00002: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
00003:     <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" FinishCompleteButtonText="Подтверждаю заказ"
00004:        FinishPreviousButtonText="Вернутся" StartNextButtonText="Дальше" StepNextButtonText="Дальше"
00005:         StepPreviousButtonText="Вернутся" Font-Names="Sans-Serif" Font-Size="X-Small" CssClass=".s1">
00006:         <WizardSteps>
00007:             <asp:WizardStep runat="server" Title="Ваш заказ" StepType="Start">
00008:    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="PricePosition" PageSize="50">
00009:                     <HeaderStyle Font-Bold="False" Wrap="False" CssClass=".s2" BackColor="#D0E2F0" Font-Size="X-Small" />
00010:                     <AlternatingRowStyle Font-Names="sans-serif" Font-Size="X-Small" ForeColor="#8080FF" Wrap="False" />
00011:                     <RowStyle Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Navy" Wrap="False" />
00012:                     <Columns>
00013:                         <asp:BoundField DataField="Tovarname" HeaderText="Наименование товара" ReadOnly="True" />
00014:                         <asp:BoundField DataField="UsdCost" HeaderText="Цена (USD)" ReadOnly="True" >
00015:                             <ItemStyle HorizontalAlign="Center" />
00016:                         </asp:BoundField>
00017:                         <asp:TemplateField HeaderText="Количество">
00018:                             <EditItemTemplate>
00019:                                 <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Kol") %>' Width="50px"></asp:TextBox><asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*" MaximumValue="999" MinimumValue="0"></asp:RangeValidator><asp:RequiredFieldValidator
00020:                                     ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="*"></asp:RequiredFieldValidator>
00021:                             </EditItemTemplate>
00022:                             <ItemTemplate>
00023:                                 <asp:Label ID="Label1" runat="server" Text='<%# Bind("Kol") %>'></asp:Label>
00024:                             </ItemTemplate>
00025:                             <ItemStyle HorizontalAlign="Center" />
00026:                         </asp:TemplateField>
00027:                         <asp:CommandField ButtonType="Button" CancelText="Отменить" EditText="Изменить" ShowEditButton="True"
00028:                             UpdateText="Установить" ShowCancelButton="False" />
00029:                         <asp:BoundField DataField="RubCost" HeaderText="Сумма (руб)" ReadOnly="True" >
00030:                             <ItemStyle HorizontalAlign="Center" />
00031:                         </asp:BoundField>
00032:                     </Columns>
00033:                 </asp:GridView>
00034:                 <table>
00035:                     <tr>
00036:                         <td>
00037:                 <asp:Label ID="Label15" runat="server" Font-Bold="True" Font-Names="sans-serif" Font-Size="X-Small"
00038:                     ForeColor="Navy" Text="Итого общая сумма заказа:" Width="186px"></asp:Label>
00039:                         </td>
00040:                         <td style="width: 99%">
00041:                         </td>
00042:                         <td>
00043:                 <asp:Label ID="Label16" runat="server" Font-Bold="True" Font-Names="sans-serif" Font-Size="X-Small"
00044:                     ForeColor="Navy"></asp:Label>
00045:                         </td>
00046:                         <td style="width: 3px">
00047:                             <asp:Label ID="Label17" runat="server" Font-Bold="True" Font-Names="sans-serif" Font-Size="X-Small"
00048:                                 ForeColor="Navy" Text="(руб)"></asp:Label>
00049:                         </td>
00050:                     </tr>
00051:                 </table>
00052:             </asp:WizardStep>
00053:             <asp:WizardStep runat="server" Title="Адрес доставки" StepType="Step" > 
00054:                 <table>
00055:                     <tr>
00056:                         <td>
00057:                             &nbsp; &nbsp; &nbsp; &nbsp;
00058:                         </td>
00059:                         <td>
00060:                             <asp:Label ID="Label1" runat="server" Font-Names="sans-serif" Font-Size="X-Small"  Text="Электронная почта" ForeColor="Blue"></asp:Label>
00061:                         </td>
00062:                         <td>
00063:                             <asp:TextBox ID="txEmail" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00064:                         </td>
00065:                         <td>
00066:                             <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="(не верно)" ControlToValidate="txEmail" Font-Names="sans-serif" Font-Size="X-Small" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
00067:                         </td>
00068:                     </tr>
00069:                     <tr>
00070:                         <td  >
00071:                         </td>
00072:                         <td >
00073:                             <asp:Label ID="Label2" runat="server" Text="Имя/Фамилия" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00074:                         </td>
00075:                         <td>
00076:                             <asp:TextBox ID="txName" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00077:                         </td>
00078:                         <td>
00079:                             <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="(не указано)" ControlToValidate="txName" Font-Names="sans-serif" Font-Size="X-Small"></asp:RequiredFieldValidator>
00080:                         </td>
00081:                     </tr>
00082:                     <tr>
00083:                         <td  >
00084:                         </td>
00085:                         <td >
00086:                             <asp:Label ID="Label3" runat="server" Text="Телефон" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00087:                         </td>
00088:                         <td>
00089:                             <asp:TextBox ID="txTelefon1" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00090:                         </td>
00091:                         <td>
00092:                             <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="(не указано)" ControlToValidate="txTelefon1" Font-Names="sens-serif" Font-Size="X-Small"></asp:RequiredFieldValidator>
00093:                         </td>
00094:                     </tr>
00095:                     <tr>
00096:                         <td  >
00097:                         </td>
00098:                         <td >
00099:                             <asp:Label ID="Label4" runat="server" Text="Телефон" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00100:                         </td>
00101:                         <td>
00102:                             <asp:TextBox ID="txTelefon2" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00103:                         </td>
00104:                         <td>
00105:                         </td>
00106:                     </tr>
00107:                     <tr>
00108:                         <td  >
00109:                         </td>
00110:                         <td >
00111:                             <asp:Label ID="Label5" runat="server" Text="Телефон" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00112:                         </td>
00113:                         <td>
00114:                             <asp:TextBox ID="txTelefon3" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00115:                         </td>
00116:                         <td>
00117:                         </td>
00118:                     </tr>
00119:                     <tr>
00120:                         <td  >
00121:                         </td>
00122:                         <td >
00123:                             <asp:Label ID="Label6" runat="server" Text="Город" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00124:                         </td>
00125:                         <td>
00126:                             <asp:TextBox ID="txGorod" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px">Москва</asp:TextBox>
00127:                         </td>
00128:                         <td>
00129:                             <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="(не указано)" ControlToValidate="txGorod" Font-Names="sans-serif" Font-Size="X-Small"></asp:RequiredFieldValidator>
00130:                         </td>
00131:                     </tr>
00132:                     <tr>
00133:                         <td  >
00134:                         </td>
00135:                         <td >
00136:                             <asp:Label ID="Label8" runat="server" Text="Почтовый индекс" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00137:                         </td>
00138:                         <td>
00139:                             <asp:TextBox ID="txPIndex" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00140:                         </td>
00141:                         <td>
00142:                         </td>
00143:                     </tr>
00144:                     <tr>
00145:                         <td  >
00146:                         </td>
00147:                         <td >
00148:                             <asp:Label ID="Label9" runat="server" Text="Улица" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00149:                         </td>
00150:                         <td>
00151:                             <asp:TextBox ID="txUlitsa" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00152:                         </td>
00153:                         <td>
00154:                             <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="(не указано)" ControlToValidate="txUlitsa" Font-Names="sans-serif" Font-Size="X-Small"></asp:RequiredFieldValidator>
00155:                         </td>
00156:                     </tr>
00157:                     <tr>
00158:                         <td  >
00159:                         </td>
00160:                         <td >
00161:                             <asp:Label ID="Label10" runat="server" Text="Дом" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00162:                         </td>
00163:                         <td >
00164:                             <asp:TextBox ID="txDom" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00165:                         </td>
00166:                         <td>
00167:                             <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="(не указано)" ControlToValidate="txDom" Font-Names="sans-serif" Font-Size="X-Small"></asp:RequiredFieldValidator>
00168:                         </td>
00169:                     </tr>
00170:                     <tr>
00171:                         <td  >
00172:                         </td>
00173:                         <td >
00174:                             <asp:Label ID="Label11" runat="server" Text="Квартира" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00175:                         </td>
00176:                         <td>
00177:                             <asp:TextBox ID="txKvart" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00178:                         </td>
00179:                         <td>
00180:                             <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="(не указано)" ControlToValidate="txKvart" Font-Names="sans-serif" Font-Size="X-Small"></asp:RequiredFieldValidator>
00181:                         </td>
00182:                     </tr>
00183:                     <tr>
00184:                         <td  >
00185:                         </td>
00186:                         <td >
00187:                             <asp:Label ID="Label12" runat="server" Text="Домофон" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00188:                         </td>
00189:                         <td>
00190:                             <asp:TextBox ID="txDomofon" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00191:                         </td>
00192:                         <td>
00193:                         </td>
00194:                     </tr>
00195:                     <tr>
00196:                         <td  >
00197:                         </td>
00198:                         <td >
00199:                             <asp:Label ID="Label13" runat="server" Text="Метро" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00200:                         </td>
00201:                         <td>
00202:                             <asp:DropDownList ID="Metro" runat="server" Font-Names="sans-serif" Font-Size="X-Small" DataMember="DefaultView" DataSourceID="SqlDataSource2" DataTextField="Name" DataValueField="i" Width="300px">
00203:                             </asp:DropDownList>
00204:                         </td>
00205:                         <td>
00206:                         </td>
00207:                     </tr>
00208:                     <tr>
00209:                         <td  >
00210:                         </td>
00211:                         <td >
00212:                             <asp:Label ID="Label14" runat="server" Text="Доп.Сообщение" Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Blue"></asp:Label>
00213:                         </td>
00214:                         <td>
00215:                             <asp:TextBox ID="txText" runat="server" Font-Names="sans-serif" Font-Size="X-Small" Width="300px"></asp:TextBox>
00216:                         </td>
00217:                         <td>
00218:                         </td>
00219:                     </tr>
00220:                 </table>
00221:                 </asp:WizardStep>
00222:             <asp:WizardStep runat="server" Title="Подтверждение" StepType="Finish">
00223:                 <p align="justify">
00224:                     <asp:Panel ID="Panel1" runat="server" Font-Names="sans-serif" Font-Size="X-Small"
00225:                         ForeColor="Black" Height="50px" Width="416px">
00226:                         <p align="justify" style="font-size: x-small; color: navy; font-family: Sans-Serif">
00227:                             Вы подтверждаете &nbsp;заказ на сумму
00228:                             <asp:Label ID="Label18" runat="server" Text="Label"></asp:Label>
00229:                             &nbsp;(руб)?
00230:                         </p>
00231:                         <p align="justify" style="font-size: x-small; color: navy; font-family: Sans-Serif">
00232:                             Дату доставки вы сможете уточнить у курьера.</p>
00233:                     </asp:Panel>
00234:                     &nbsp;</p>
00235:             </asp:WizardStep>
00236:             <asp:WizardStep runat="server" StepType="Complete" Title="Состояние заказов">
00237:                 <asp:Label ID="Label7" runat="server" Font-Names="sans-serif" Font-Size="X-Small"
00238:                     ForeColor="Blue" Text="У вас нет заказов."></asp:Label>
00239:                 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="i"
00240:                     DataMember="DefaultView" DataSourceID="SqlDataSource1" CssClass=".s1">
00241:                     <HeaderStyle BackColor="#D0E2F0" Font-Bold="False" Font-Size="X-Small" CssClass=".s2" />
00242:                     <AlternatingRowStyle Font-Names="sans-serif" Font-Size="X-Small" ForeColor="#8080FF" Wrap="False" />
00243:                     <Columns>
00244:                         <asp:BoundField DataField="i" HeaderText="Заказ" InsertVisible="False" ReadOnly="True"
00245:                             SortExpression="i" />
00246:                         <asp:BoundField DataField="Summa" HeaderText="Сумма" ReadOnly="True" SortExpression="Summa" />
00247:                         <asp:BoundField DataField="Open" HeaderText="Создан" ReadOnly="True" SortExpression="Open" />
00248:                         <asp:BoundField DataField="Closed" HeaderText="Выполнен" ReadOnly="True" SortExpression="Closed" />
00249:                     </Columns>
00250:                     <RowStyle Font-Names="sans-serif" Font-Size="X-Small" ForeColor="Navy" Wrap="False" />
00251:                     <EditRowStyle CssClass=".s1" />
00252:                 </asp:GridView>
00253:             </asp:WizardStep>
00254:         </WizardSteps>
00255:         <SideBarButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00256:         <StepNextButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00257:         <StepStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00258:         <StartNextButtonStyle Font-Names="sans-serif" Font-Size="X-Small" />
00259:         <FinishCompleteButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00260:         <SideBarStyle Font-Names="Sans-Serif" Font-Size="X-Small" VerticalAlign="Top" />
00261:         <FinishPreviousButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00262:         <NavigationButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00263:         <NavigationStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00264:         <HeaderStyle CssClass=".s2" />
00265:         <CancelButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00266:         <StepPreviousButtonStyle Font-Names="Sans-Serif" Font-Size="X-Small" />
00267:     </asp:Wizard>
00268:     &nbsp;
00269:     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SH_Zakaz %>" ProviderName="<%$ ConnectionStrings:SH_Zakaz.ProviderName %>" DataSourceMode="DataReader">
00270:     </asp:SqlDataSource>
00271:     <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SH_Zakaz %>"
00272:         ProviderName="<%$ ConnectionStrings:SH_Zakaz.ProviderName %>" SelectCommand="SELECT [i], [Name] FROM [Metro] ORDER BY [Name]">
00273:     </asp:SqlDataSource>
00274:     <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:SH_Zakaz %>"
00275:         InsertCommand="INSERT INTO Tovar(ToZakaz, ToPrice, Kol, Cost) VALUES (@ToZakaz,@ToPrice,@Kol,@Cost)"
00276:         SelectCommand="SELECT * FROM [Tovar]">
00277:         <InsertParameters>
00278:             <asp:SessionParameter Name="ToZakaz" SessionField="ToZakaz" />
00279:             <asp:SessionParameter Name="ToPrice" SessionField="ToPrice" />
00280:             <asp:SessionParameter Name="Kol" SessionField="Kol" />
00281:             <asp:SessionParameter Name="Cost" SessionField="Cost" />
00282:         </InsertParameters>
00283:     </asp:SqlDataSource>
00284: </asp:Content>


Comments ( )
Link to this page: //www.vb-net.com/asp2/3/1.htm
< THANKS ME>