1:  00099:     Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
   2:  00100:         Dim Date1 As DateTime
   3:  00101:         Try
   4:  00102:             Date1 = New DateTime(cb1Year.SelectedValue, cb1Month.SelectedValue, cb1Day.SelectedValue)
   5:  00103:         Catch ex As Exception
   6:  00104:             'неверная дата типа 31 февраля
   7:  00105:             Exit Sub
   8:  00106:         End Try
   9:  00107:         Dim Date2 As DateTime
  10:  00108:         Try
  11:  00109:             Date2 = New DateTime(cb2Year.SelectedValue, cb2Month.SelectedValue, cb2Day.SelectedValue)
  12:  00110:         Catch ex As Exception
  13:  00111:             'неверная дата типа 31 февраля
  14:  00112:             Exit Sub
  15:  00113:         End Try
  16:  00114:         If Date2 <= Date1 Then
  17:  00115:             Exit Sub
  18:  00116:         End If
  19:  00117:         Response.Redirect("RBU10.aspx?i=" & Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey.ToString & "&GroupID=" & DropDownList1.SelectedItem.Value & "&GroupName=" & DropDownList1.SelectedItem.Text & "&StartDate=" & Date1.ToShortDateString & "&StopDate=" & Date2.ToShortDateString & "&Mode=Crystal")
  20:  00118:     End Sub
  21:  00119: 
  22:  00120: 
  23:  00121:     Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
  24:  00122:         Dim Date1 As DateTime
  25:  00123:         Try
  26:  00124:             Date1 = New DateTime(cb1Year.SelectedValue, cb1Month.SelectedValue, cb1Day.SelectedValue)
  27:  00125:         Catch ex As Exception
  28:  00126:             'неверная дата типа 31 февраля
  29:  00127:             Exit Sub
  30:  00128:         End Try
  31:  00129:         Dim Date2 As DateTime
  32:  00130:         Try
  33:  00131:             Date2 = New DateTime(cb2Year.SelectedValue, cb2Month.SelectedValue, cb2Day.SelectedValue)
  34:  00132:         Catch ex As Exception
  35:  00133:             'неверная дата типа 31 февраля
  36:  00134:             Exit Sub
  37:  00135:         End Try
  38:  00136:         If Date2 <= Date1 Then
  39:  00137:             Exit Sub
  40:  00138:         End If
  41:  00139:         'Response.Redirect("RBU10.aspx?i=" & Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey.ToString & "&GroupID=" & DropDownList1.SelectedItem.Value & "&GroupName=" & DropDownList1.SelectedItem.Text & "&StartDate=" & Date1.ToShortDateString & "&StopDate=" & Date2.ToShortDateString & "&Mode=Excel&ExcelDebug=1")
  42:  00140:         Response.Redirect("RBU10.aspx?i=" & Membership.GetUser(HttpContext.Current.User.Identity.Name).ProviderUserKey.ToString & "&GroupID=" & DropDownList1.SelectedItem.Value & "&GroupName=" & DropDownList1.SelectedItem.Text & "&StartDate=" & Date1.ToShortDateString & "&StopDate=" & Date2.ToShortDateString & "&Mode=Excel")
  43:  00141:     End Sub


Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/asp2/39/1.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>