Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/Leeforall/NFCShopping

Conflicts:
	WebSite/WebSite/NFCShoppingWebSite.csproj
	WebSite/WebSite/WebPages/DiscountItemAdd.aspx.cs
  • Loading branch information...
commit 3d04b39c2ebee720e85b62384545fe27561eb215 2 parents 346c2c3 + 14d5839
@EternalWind authored
Showing with 746 additions and 444 deletions.
  1. +41 −68 WebSite/WebSite/Access_Data/ShopEntities.Designer.cs
  2. +45 −52 WebSite/WebSite/Access_Data/ShopEntities.edmx
  3. +23 −20 WebSite/WebSite/Account/ChangePassword.aspx
  4. +8 −8 WebSite/WebSite/Account/ChangePassword.aspx.designer.cs
  5. +12 −11 WebSite/WebSite/Account/Login.aspx
  6. +1 −0  WebSite/WebSite/Account/Login.aspx.cs
  7. +11 −11 WebSite/WebSite/Account/Login.aspx.designer.cs
  8. +47 −0 WebSite/WebSite/Account/PasswordRecovery.aspx
  9. +17 −0 WebSite/WebSite/Account/PasswordRecovery.aspx.cs
  10. +24 −0 WebSite/WebSite/Account/PasswordRecovery.aspx.designer.cs
  11. +21 −20 WebSite/WebSite/Account/Register.aspx
  12. +1 −5 WebSite/WebSite/BLL/DiscountBL.cs
  13. +11 −0 WebSite/WebSite/NFCShoppingWebSite.csproj
  14. +3 −0  WebSite/WebSite/NFCShoppingWebSite.csproj.user
  15. +1 −1  WebSite/WebSite/Styles/Site.Master
  16. +17 −17 WebSite/WebSite/Styles/Site.Master.designer.cs
  17. +17 −20 WebSite/WebSite/Web.config
  18. +0 −1  WebSite/WebSite/WebPages/DiscountAdd.aspx.cs
  19. +3 −1 WebSite/WebSite/WebPages/DiscountDetails.aspx
  20. +11 −11 WebSite/WebSite/WebPages/DiscountDetails.aspx.designer.cs
  21. +1 −3 WebSite/WebSite/WebPages/DiscountItemEdit.aspx.cs
  22. +3 −0  WebSite/WebSite/WebPages/web.config
  23. +1 −1  mobile phone client/NFCShopping/AndroidManifest.xml
  24. +52 −54 mobile phone client/NFCShopping/gen/scut/bgooo/ui/R.java
  25. +1 −1  mobile phone client/NFCShopping/res/layout/comment.xml
  26. +1 −1  mobile phone client/NFCShopping/res/layout/datetagitemview.xml
  27. +1 −21 mobile phone client/NFCShopping/res/layout/discountitem.xml
  28. +4 −3 mobile phone client/NFCShopping/res/layout/discountshititem.xml
  29. +2 −2 mobile phone client/NFCShopping/res/layout/itemview.xml
  30. +6 −5 mobile phone client/NFCShopping/res/layout/productitem.xml
  31. +19 −1 mobile phone client/NFCShopping/src/scut/bgooo/concern/ConcernItem.java
  32. +5 −1 mobile phone client/NFCShopping/src/scut/bgooo/concern/ConcernItemAdapter.java
  33. +11 −7 mobile phone client/NFCShopping/src/scut/bgooo/concern/ConcernManager.java
  34. +2 −1  mobile phone client/NFCShopping/src/scut/bgooo/db/DBHelper.java
  35. +18 −0 mobile phone client/NFCShopping/src/scut/bgooo/db/TransistionUtil.java
  36. +5 −3 mobile phone client/NFCShopping/src/scut/bgooo/db/UserProfileUtil.java
  37. +16 −5 mobile phone client/NFCShopping/src/scut/bgooo/entities/Discount.java
  38. +6 −23 mobile phone client/NFCShopping/src/scut/bgooo/entities/DiscountItem.java
  39. +1 −0  mobile phone client/NFCShopping/src/scut/bgooo/ui/CollectionListActivity.java
  40. +4 −2 mobile phone client/NFCShopping/src/scut/bgooo/ui/CommentActivity.java
  41. +16 −8 mobile phone client/NFCShopping/src/scut/bgooo/ui/CommentListActivity.java
  42. +31 −17 mobile phone client/NFCShopping/src/scut/bgooo/ui/DiscountItemListActivity.java
  43. +5 −4 mobile phone client/NFCShopping/src/scut/bgooo/ui/DiscountListActivity.java
  44. +1 −0  mobile phone client/NFCShopping/src/scut/bgooo/ui/LoginActivity.java
  45. +27 −14 mobile phone client/NFCShopping/src/scut/bgooo/ui/MoreActivity.java
  46. +126 −16 mobile phone client/NFCShopping/src/scut/bgooo/ui/ProductActivity.java
  47. +0 −2  mobile phone client/NFCShopping/src/scut/bgooo/ui/VerifierWebViewActivity.java
  48. +2 −0  mobile phone client/NFCShopping/src/scut/bgooo/utility/Task.java
  49. +64 −3 mobile phone client/NFCShopping/src/scut/bgooo/utility/TaskHandler.java
  50. +1 −0  mobile phone client/NFCShopping/src/scut/bgooo/webservice/WebServiceUtil.java
View
109 WebSite/WebSite/Access_Data/ShopEntities.Designer.cs
@@ -400,13 +400,15 @@ public partial class Discount : EntityObject
/// </summary>
/// <param name="discountID">discountID 属性的初始值。</param>
/// <param name="description">description 属性的初始值。</param>
- /// <param name="createdAt">createdAt 属性的初始值。</param>
- public static Discount CreateDiscount(global::System.Int32 discountID, global::System.String description, global::System.DateTime createdAt)
+ /// <param name="startDate">startDate 属性的初始值。</param>
+ /// <param name="endDate">endDate 属性的初始值。</param>
+ public static Discount CreateDiscount(global::System.Int32 discountID, global::System.String description, global::System.DateTime startDate, global::System.DateTime endDate)
{
Discount discount = new Discount();
discount.discountID = discountID;
discount.description = description;
- discount.createdAt = createdAt;
+ discount.startDate = startDate;
+ discount.endDate = endDate;
return discount;
}
@@ -469,24 +471,48 @@ public static Discount CreateDiscount(global::System.Int32 discountID, global::S
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
- public global::System.DateTime createdAt
+ public global::System.DateTime startDate
{
get
{
- return _createdAt;
+ return _startDate;
}
set
{
- OncreatedAtChanging(value);
- ReportPropertyChanging("createdAt");
- _createdAt = StructuralObject.SetValidValue(value);
- ReportPropertyChanged("createdAt");
- OncreatedAtChanged();
+ OnstartDateChanging(value);
+ ReportPropertyChanging("startDate");
+ _startDate = StructuralObject.SetValidValue(value);
+ ReportPropertyChanged("startDate");
+ OnstartDateChanged();
}
}
- private global::System.DateTime _createdAt;
- partial void OncreatedAtChanging(global::System.DateTime value);
- partial void OncreatedAtChanged();
+ private global::System.DateTime _startDate;
+ partial void OnstartDateChanging(global::System.DateTime value);
+ partial void OnstartDateChanged();
+
+ /// <summary>
+ /// 没有元数据文档可用。
+ /// </summary>
+ [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
+ [DataMemberAttribute()]
+ public global::System.DateTime endDate
+ {
+ get
+ {
+ return _endDate;
+ }
+ set
+ {
+ OnendDateChanging(value);
+ ReportPropertyChanging("endDate");
+ _endDate = StructuralObject.SetValidValue(value);
+ ReportPropertyChanged("endDate");
+ OnendDateChanged();
+ }
+ }
+ private global::System.DateTime _endDate;
+ partial void OnendDateChanging(global::System.DateTime value);
+ partial void OnendDateChanged();
#endregion
@@ -535,9 +561,7 @@ public partial class DiscountItem : EntityObject
/// <param name="productID">productID 属性的初始值。</param>
/// <param name="discountPercent">discountPercent 属性的初始值。</param>
/// <param name="description">description 属性的初始值。</param>
- /// <param name="startDate">startDate 属性的初始值。</param>
- /// <param name="endDate">endDate 属性的初始值。</param>
- public static DiscountItem CreateDiscountItem(global::System.Int32 id, global::System.Int32 discountID, global::System.Int32 productID, global::System.Single discountPercent, global::System.String description, global::System.DateTime startDate, global::System.DateTime endDate)
+ public static DiscountItem CreateDiscountItem(global::System.Int32 id, global::System.Int32 discountID, global::System.Int32 productID, global::System.Single discountPercent, global::System.String description)
{
DiscountItem discountItem = new DiscountItem();
discountItem.id = id;
@@ -545,8 +569,6 @@ public static DiscountItem CreateDiscountItem(global::System.Int32 id, global::S
discountItem.productID = productID;
discountItem.discountPercent = discountPercent;
discountItem.description = description;
- discountItem.startDate = startDate;
- discountItem.endDate = endDate;
return discountItem;
}
@@ -675,54 +697,6 @@ public static DiscountItem CreateDiscountItem(global::System.Int32 id, global::S
private global::System.String _description;
partial void OndescriptionChanging(global::System.String value);
partial void OndescriptionChanged();
-
- /// <summary>
- /// 没有元数据文档可用。
- /// </summary>
- [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
- [DataMemberAttribute()]
- public global::System.DateTime startDate
- {
- get
- {
- return _startDate;
- }
- set
- {
- OnstartDateChanging(value);
- ReportPropertyChanging("startDate");
- _startDate = StructuralObject.SetValidValue(value);
- ReportPropertyChanged("startDate");
- OnstartDateChanged();
- }
- }
- private global::System.DateTime _startDate;
- partial void OnstartDateChanging(global::System.DateTime value);
- partial void OnstartDateChanged();
-
- /// <summary>
- /// 没有元数据文档可用。
- /// </summary>
- [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
- [DataMemberAttribute()]
- public global::System.DateTime endDate
- {
- get
- {
- return _endDate;
- }
- set
- {
- OnendDateChanging(value);
- ReportPropertyChanging("endDate");
- _endDate = StructuralObject.SetValidValue(value);
- ReportPropertyChanged("endDate");
- OnendDateChanged();
- }
- }
- private global::System.DateTime _endDate;
- partial void OnendDateChanging(global::System.DateTime value);
- partial void OnendDateChanged();
#endregion
@@ -1741,8 +1715,6 @@ public User User
/// </summary>
[BrowsableAttribute(false)]
[DataMemberAttribute()]
- [XmlIgnoreAttribute()]
- [SoapIgnoreAttribute()]
public EntityReference<User> UserReference
{
get
@@ -1849,6 +1821,7 @@ public static User CreateUser(global::System.Int32 userID, global::System.String
/// </summary>
[EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
[DataMemberAttribute()]
+
[XmlIgnoreAttribute()]
[SoapIgnoreAttribute()]
public global::System.String userPassword
View
97 WebSite/WebSite/Access_Data/ShopEntities.edmx
@@ -58,17 +58,16 @@
<Property Name="discountID" Type="int" Nullable="false" />
<Property Name="productID" Type="int" Nullable="false" />
<Property Name="discountPercent" Type="real" Nullable="false" />
- <Property Name="description" Type="text" Nullable="false" />
- <Property Name="startDate" Type="smalldatetime" Nullable="false" />
- <Property Name="endDate" Type="smalldatetime" Nullable="false" />
+ <Property Name="description" Type="nvarchar(max)" Nullable="false" />
</EntityType>
<EntityType Name="Discounts">
<Key>
<PropertyRef Name="discountID" />
</Key>
<Property Name="discountID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
- <Property Name="description" Type="varchar(max)" Nullable="false" />
- <Property Name="createdAt" Type="smalldatetime" Nullable="false" />
+ <Property Name="description" Type="nvarchar(max)" Nullable="false" />
+ <Property Name="startDate" Type="smalldatetime" Nullable="false" />
+ <Property Name="endDate" Type="smalldatetime" Nullable="false" />
</EntityType>
<EntityType Name="Products">
<Key>
@@ -77,12 +76,12 @@
<Property Name="productID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
<Property Name="secCategoryID" Type="int" Nullable="false" />
<Property Name="barCode" Type="varchar" Nullable="false" MaxLength="50" />
- <Property Name="productName" Type="varchar(max)" Nullable="false" />
+ <Property Name="productName" Type="nvarchar(max)" Nullable="false" />
<Property Name="price" Type="money" Nullable="false" />
- <Property Name="brand" Type="varchar" MaxLength="50" />
- <Property Name="location" Type="varchar" MaxLength="50" />
- <Property Name="imageURL" Type="varchar(max)" />
- <Property Name="description" Type="varchar(max)" Nullable="false" />
+ <Property Name="brand" Type="nvarchar" MaxLength="50" />
+ <Property Name="location" Type="nvarchar" MaxLength="50" />
+ <Property Name="imageURL" Type="varchar" MaxLength="50" />
+ <Property Name="description" Type="nvarchar(max)" Nullable="false" />
</EntityType>
<EntityType Name="Reviews">
<Key>
@@ -268,9 +267,7 @@
<Property Name="discountID" Type="Int32" Nullable="false" />
<Property Name="productID" Type="Int32" Nullable="false" />
<Property Name="discountPercent" Type="Single" Nullable="false" />
- <Property Name="description" Type="String" Nullable="false" MaxLength="Max" Unicode="false" FixedLength="false" />
- <Property Name="startDate" Type="DateTime" Nullable="false" />
- <Property Name="endDate" Type="DateTime" Nullable="false" />
+ <Property Name="description" Type="String" Nullable="false" MaxLength="Max" Unicode="true" FixedLength="false" />
<NavigationProperty Name="Discount" Relationship="ShopDBModel.FK_DiscountInformation_Discounts" FromRole="DiscountItems" ToRole="Discounts" />
<NavigationProperty Name="Product" Relationship="ShopDBModel.FK_DiscountInformation_Products" FromRole="DiscountItems" ToRole="Products" />
</EntityType>
@@ -279,8 +276,9 @@
<PropertyRef Name="discountID" />
</Key>
<Property Name="discountID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
- <Property Name="description" Type="String" Nullable="false" MaxLength="Max" Unicode="false" FixedLength="false" />
- <Property Name="createdAt" Type="DateTime" Nullable="false" />
+ <Property Name="description" Type="String" Nullable="false" MaxLength="Max" Unicode="true" FixedLength="false" />
+ <Property Name="startDate" Type="DateTime" Nullable="false" />
+ <Property Name="endDate" Type="DateTime" Nullable="false" />
<NavigationProperty Name="DiscountItems" Relationship="ShopDBModel.FK_DiscountInformation_Discounts" FromRole="Discounts" ToRole="DiscountItems" />
</EntityType>
<EntityType Name="Product">
@@ -290,12 +288,12 @@
<Property Name="productID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
<Property Name="secCategoryID" Type="Int32" Nullable="false" />
<Property Name="barCode" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
- <Property Name="productName" Type="String" Nullable="false" MaxLength="Max" Unicode="false" FixedLength="false" />
+ <Property Name="productName" Type="String" Nullable="false" MaxLength="Max" Unicode="true" FixedLength="false" />
<Property Name="price" Type="Decimal" Nullable="false" Precision="19" Scale="4" />
- <Property Name="brand" Type="String" MaxLength="50" Unicode="false" FixedLength="false" />
- <Property Name="location" Type="String" MaxLength="50" Unicode="false" FixedLength="false" />
- <Property Name="imageURL" Type="String" MaxLength="Max" Unicode="false" FixedLength="false" />
- <Property Name="description" Type="String" Nullable="false" MaxLength="Max" Unicode="false" FixedLength="false" />
+ <Property Name="brand" Type="String" MaxLength="50" Unicode="true" FixedLength="false" />
+ <Property Name="location" Type="String" MaxLength="50" Unicode="true" FixedLength="false" />
+ <Property Name="imageURL" Type="String" MaxLength="50" Unicode="false" FixedLength="false" />
+ <Property Name="description" Type="String" Nullable="false" MaxLength="Max" Unicode="true" FixedLength="false" />
<NavigationProperty Name="DiscountItems" Relationship="ShopDBModel.FK_DiscountInformation_Products" FromRole="Products" ToRole="DiscountItems" />
<NavigationProperty Name="SecCategory" Relationship="ShopDBModel.FK_Products_SecCategories" FromRole="Products" ToRole="SecCategories" />
<NavigationProperty Name="Reviews" Relationship="ShopDBModel.FK_Reviews_Products" FromRole="Products" ToRole="Reviews" />
@@ -448,13 +446,12 @@
<ScalarProperty Name="productID" ColumnName="productID" />
<ScalarProperty Name="discountPercent" ColumnName="discountPercent" />
<ScalarProperty Name="description" ColumnName="description" />
- <ScalarProperty Name="startDate" ColumnName="startDate" />
- <ScalarProperty Name="endDate" ColumnName="endDate" />
</MappingFragment></EntityTypeMapping></EntitySetMapping>
<EntitySetMapping Name="Discounts"><EntityTypeMapping TypeName="ShopDBModel.Discount"><MappingFragment StoreEntitySet="Discounts">
<ScalarProperty Name="discountID" ColumnName="discountID" />
<ScalarProperty Name="description" ColumnName="description" />
- <ScalarProperty Name="createdAt" ColumnName="createdAt" />
+ <ScalarProperty Name="startDate" ColumnName="startDate" />
+ <ScalarProperty Name="endDate" ColumnName="endDate" />
</MappingFragment></EntityTypeMapping></EntitySetMapping>
<EntitySetMapping Name="Products"><EntityTypeMapping TypeName="ShopDBModel.Product"><MappingFragment StoreEntitySet="Products">
<ScalarProperty Name="productID" ColumnName="productID" />
@@ -515,48 +512,44 @@
<!-- Diagram content (shape and connector positions) -->
<Diagrams>
<Diagram Name="ShopEntities">
- <EntityTypeShape EntityType="ShopDBModel.Category" Width="1.5" PointX="0.75" PointY="5.25" Height="1.5879931640624996" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.DiscountItem" Width="1.5" PointX="7.5" PointY="4.625" Height="2.7341113281249996" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.Discount" Width="1.5" PointX="5.25" PointY="1.125" Height="1.7790128580729165" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.Product" Width="1.5" PointX="5.25" PointY="4.375" Height="3.3071704101562496" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.Review" Width="1.5" PointX="10.5" PointY="4.75" Height="2.5430916341145835" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.SecCategory" Width="1.5" PointX="3" PointY="5" Height="1.9700325520833326" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.Suggestion" Width="1.5" PointX="10.5" PointY="1.75" Height="1.9700325520833317" IsExpanded="true" />
- <EntityTypeShape EntityType="ShopDBModel.User" Width="1.5" PointX="8.25" PointY="0.75" Height="2.5430916341145817" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.Category" Width="1.5" PointX="0.75" PointY="3.125" Height="1.5879931640625005" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.DiscountItem" Width="1.5" PointX="7.5" PointY="2.75" Height="2.3520719401041656" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.Discount" Width="1.5" PointX="5.25" PointY="8" Height="1.9700325520833344" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.Product" Width="1.5" PointX="5.25" PointY="2.25" Height="3.3071704101562491" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.Review" Width="1.5" PointX="10.5" PointY="2.625" Height="2.5430916341145835" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.SecCategory" Width="1.5" PointX="3" PointY="3" Height="1.9700325520833326" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.Suggestion" Width="1.5" PointX="10.5" PointY="8" Height="1.9700325520833317" IsExpanded="true" />
+ <EntityTypeShape EntityType="ShopDBModel.User" Width="1.5" PointX="8.25" PointY="7.625" Height="2.5430916341145817" IsExpanded="true" />
<AssociationConnector Association="ShopDBModel.FK_SecCategories_Categories" ManuallyRouted="false">
- <ConnectorPoint PointX="2.25" PointY="6.04399658203125" />
- <ConnectorPoint PointX="3" PointY="6.04399658203125" />
+ <ConnectorPoint PointX="2.25" PointY="3.9189965820312502" />
+ <ConnectorPoint PointX="3" PointY="3.9189965820312502" />
</AssociationConnector>
<AssociationConnector Association="ShopDBModel.FK_DiscountInformation_Discounts" ManuallyRouted="false">
- <ConnectorPoint PointX="6.75" PointY="2.9040128580729165" />
- <ConnectorPoint PointX="7.125" PointY="3.2790128580729165" />
- <ConnectorPoint PointX="7.125" PointY="5.9920556640625" />
- <ConnectorPoint PointX="7.5" PointY="5.9920556640625" />
+ <ConnectorPoint PointX="6.75" PointY="8.0011528461538468" />
+ <ConnectorPoint PointX="7.125" PointY="7.6261528461538468" />
+ <ConnectorPoint PointX="7.125" PointY="3.9260359700520828" />
+ <ConnectorPoint PointX="7.5" PointY="3.9260359700520828" />
</AssociationConnector>
<AssociationConnector Association="ShopDBModel.FK_DiscountInformation_Products" ManuallyRouted="false">
- <ConnectorPoint PointX="6.75" PointY="5.24602783203125" />
- <ConnectorPoint PointX="7.041666666666667" PointY="5.246027832031249" />
- <ConnectorPoint PointX="7.208333333333333" PointY="5.24602783203125" />
- <ConnectorPoint PointX="7.5" PointY="5.24602783203125" />
+ <ConnectorPoint PointX="6.75" PointY="3.2755179850260414" />
+ <ConnectorPoint PointX="7.5" PointY="3.2755179850260414" />
</AssociationConnector>
<AssociationConnector Association="ShopDBModel.FK_Products_SecCategories" ManuallyRouted="false">
- <ConnectorPoint PointX="4.5" PointY="5.9850162760416659" />
- <ConnectorPoint PointX="5.25" PointY="5.9850162760416659" />
+ <ConnectorPoint PointX="4.5" PointY="3.9850162760416663" />
+ <ConnectorPoint PointX="5.25" PointY="3.9850162760416663" />
</AssociationConnector>
<AssociationConnector Association="ShopDBModel.FK_Reviews_Products" ManuallyRouted="false">
- <ConnectorPoint PointX="6.75" PointY="7.5518908691406246" />
- <ConnectorPoint PointX="11.25" PointY="7.5518908691406246" />
- <ConnectorPoint PointX="11.25" PointY="7.2930916341145835" />
+ <ConnectorPoint PointX="6.75" PointY="2.65625" />
+ <ConnectorPoint PointX="10.5" PointY="2.65625" />
</AssociationConnector>
<AssociationConnector Association="ShopDBModel.FK_Reviews_Users" ManuallyRouted="false">
- <ConnectorPoint PointX="9.75" PointY="3.2919367879607355" />
- <ConnectorPoint PointX="10.125" PointY="3.6669367879607355" />
- <ConnectorPoint PointX="10.125" PointY="6.0215458170572917" />
- <ConnectorPoint PointX="10.5" PointY="6.0215458170572917" />
+ <ConnectorPoint PointX="9.40625" PointY="7.625" />
+ <ConnectorPoint PointX="9.40625" PointY="2.671875" />
+ <ConnectorPoint PointX="10.5" PointY="2.671875" />
</AssociationConnector>
<AssociationConnector Association="ShopDBModel.FK_Suggestions_Users" ManuallyRouted="false">
- <ConnectorPoint PointX="9.75" PointY="2.489715893980367" />
- <ConnectorPoint PointX="10.5" PointY="2.489715893980367" />
+ <ConnectorPoint PointX="9.75" PointY="8.9850162760416659" />
+ <ConnectorPoint PointX="10.5" PointY="8.9850162760416659" />
</AssociationConnector>
</Diagram>
</Diagrams>
View
43 WebSite/WebSite/Account/ChangePassword.aspx
@@ -11,48 +11,51 @@
请使用以下表单更改密码。
</p>
<p>
- 新密码的长度至少必须为 <%= Membership.MinRequiredPasswordLength %> 个字符。
+ 新密码的长度至少必须为
+ <%= Membership.MinRequiredPasswordLength %>
+ 个字符。
</p>
- <asp:ChangePassword ID="ChangeUserPassword" runat="server" CancelDestinationPageUrl="~/" EnableViewState="false" RenderOuterTable="false"
- SuccessPageUrl="ChangePasswordSuccess.aspx">
+ <asp:ChangePassword ID="ChangeUserPassword" runat="server" CancelDestinationPageUrl="~/"
+ EnableViewState="false" RenderOuterTable="false" SuccessPageUrl="ChangePasswordSuccess.aspx">
<ChangePasswordTemplate>
<span class="failureNotification">
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
</span>
- <asp:ValidationSummary ID="ChangeUserPasswordValidationSummary" runat="server" CssClass="failureNotification"
- ValidationGroup="ChangeUserPasswordValidationGroup"/>
+ <asp:ValidationSummary ID="ChangeUserPasswordValidationSummary" runat="server" CssClass="failureNotification"
+ ValidationGroup="ChangeUserPasswordValidationGroup" />
<div class="accountInfo">
<fieldset class="changePassword">
<legend>帐户信息</legend>
<p>
<asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">旧密码:</asp:Label>
<asp:TextBox ID="CurrentPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
- <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
- CssClass="failureNotification" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“旧密码”。"
- ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
+ CssClass="failureNotification" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“旧密码”。"
+ ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">新密码:</asp:Label>
<asp:TextBox ID="NewPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
- <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
- CssClass="failureNotification" ErrorMessage="必须填写“新密码”。" ToolTip="必须填写“新密码”。"
- ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
+ CssClass="failureNotification" ErrorMessage="必须填写“新密码”。" ToolTip="必须填写“新密码”。"
+ ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">确认新密码:</asp:Label>
<asp:TextBox ID="ConfirmNewPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
- <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
- CssClass="failureNotification" Display="Dynamic" ErrorMessage="必须填写“确认新密码”。"
- ToolTip="必须填写“确认新密码”。" ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
- <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword"
- CssClass="failureNotification" Display="Dynamic" ErrorMessage="“确认新密码”与“新密码”项必须匹配。"
- ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:CompareValidator>
+ <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
+ CssClass="failureNotification" Display="Dynamic" ErrorMessage="必须填写“确认新密码”。"
+ ToolTip="必须填写“确认新密码”。" ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
+ ControlToValidate="ConfirmNewPassword" CssClass="failureNotification" Display="Dynamic"
+ ErrorMessage="“确认新密码”与“新密码”项必须匹配。" ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:CompareValidator>
</p>
</fieldset>
<p class="submitButton">
- <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="取消"/>
- <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword" Text="更改密码"
- ValidationGroup="ChangeUserPasswordValidationGroup"/>
+ <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel"
+ Text="取消" />
+ <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword"
+ Text="更改密码" ValidationGroup="ChangeUserPasswordValidationGroup" />
</p>
</div>
</ChangePasswordTemplate>
View
16 WebSite/WebSite/Account/ChangePassword.aspx.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
+// <自动生成>
+// 此代码由工具生成。
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+// </自动生成>
//------------------------------------------------------------------------------
namespace NFCShoppingWebSite.Account {
@@ -13,11 +13,11 @@ namespace NFCShoppingWebSite.Account {
public partial class ChangePassword {
/// <summary>
- /// ChangeUserPassword control.
+ /// ChangeUserPassword 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ChangePassword ChangeUserPassword;
}
View
23 WebSite/WebSite/Account/Login.aspx
@@ -9,41 +9,42 @@
</h2>
<p>
请输入用户名和密码。
- <asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false">注册</asp:HyperLink> 如果您没有帐户。
+ <asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false">注册</asp:HyperLink>
+ 如果您没有帐户。
</p>
<asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false">
<LayoutTemplate>
<span class="failureNotification">
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
</span>
- <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification"
- ValidationGroup="LoginUserValidationGroup"/>
+ <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification"
+ ValidationGroup="LoginUserValidationGroup" />
<div class="accountInfo">
<fieldset class="login">
<legend>帐户信息</legend>
<p>
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">用户名:</asp:Label>
<asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
- <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
- CssClass="failureNotification" ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。"
- ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
+ CssClass="failureNotification" ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。"
+ ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">密码:</asp:Label>
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
- <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
- CssClass="failureNotification" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。"
- ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
+ CssClass="failureNotification" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。" ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
- <asp:CheckBox ID="RememberMe" runat="server"/>
+ <asp:CheckBox ID="RememberMe" runat="server" />
<asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">保持登录状态</asp:Label>
</p>
</fieldset>
<p class="submitButton">
- <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="登录" ValidationGroup="LoginUserValidationGroup"/>
+ <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="登录" ValidationGroup="LoginUserValidationGroup" />
</p>
</div>
</LayoutTemplate>
</asp:Login>
+
</asp:Content>
View
1  WebSite/WebSite/Account/Login.aspx.cs
@@ -12,6 +12,7 @@ public partial class Login : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
{
RegisterHyperLink.NavigateUrl = "Register.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
+
}
}
}
View
22 WebSite/WebSite/Account/Login.aspx.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
+// <自动生成>
+// 此代码由工具生成。
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+// </自动生成>
//------------------------------------------------------------------------------
namespace NFCShoppingWebSite.Account {
@@ -13,20 +13,20 @@ namespace NFCShoppingWebSite.Account {
public partial class Login {
/// <summary>
- /// RegisterHyperLink control.
+ /// RegisterHyperLink 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink RegisterHyperLink;
/// <summary>
- /// LoginUser control.
+ /// LoginUser 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Login LoginUser;
}
View
47 WebSite/WebSite/Account/PasswordRecovery.aspx
@@ -0,0 +1,47 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Styles/Site.Master" AutoEventWireup="true" CodeBehind="PasswordRecovery.aspx.cs" Inherits="NFCShoppingWebSite.Account.PasswordRecovery" %>
+<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
+</asp:Content>
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+ <asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
+ <UserNameTemplate>
+ <table cellpadding="1" cellspacing="0" style="border-collapse:collapse;">
+ <tr>
+ <td>
+ <table cellpadding="0">
+ <tr>
+ <td align="center" colspan="2">
+ 是否忘记了您的密码?</td>
+ </tr>
+ <tr>
+ <td align="center" colspan="2">
+ 要接收您的密码,请输入您的用户名。</td>
+ </tr>
+ <tr>
+ <td align="right">
+ <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">用户名:</asp:Label>
+ </td>
+ <td>
+ <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
+ <asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
+ ControlToValidate="UserName" ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。"
+ ValidationGroup="PasswordRecovery1">*</asp:RequiredFieldValidator>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" colspan="2" style="color:Red;">
+ <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" colspan="2">
+ <asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="提交"
+ ValidationGroup="PasswordRecovery1" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </UserNameTemplate>
+ </asp:PasswordRecovery>
+</asp:Content>
View
17 WebSite/WebSite/Account/PasswordRecovery.aspx.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace NFCShoppingWebSite.Account
+{
+ public partial class PasswordRecovery : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
View
24 WebSite/WebSite/Account/PasswordRecovery.aspx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+// </自动生成>
+//------------------------------------------------------------------------------
+
+namespace NFCShoppingWebSite.Account {
+
+
+ public partial class PasswordRecovery {
+
+ /// <summary>
+ /// PasswordRecovery1 控件。
+ /// </summary>
+ /// <remarks>
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// </remarks>
+ protected global::System.Web.UI.WebControls.PasswordRecovery PasswordRecovery1;
+ }
+}
View
41 WebSite/WebSite/Account/Register.aspx
@@ -19,51 +19,52 @@
使用以下表单创建新帐户。
</p>
<p>
- 密码的长度至少必须为 <%= Membership.MinRequiredPasswordLength %> 个字符。
+ 密码的长度至少必须为
+ <%= Membership.MinRequiredPasswordLength %>
+ 个字符。
</p>
<span class="failureNotification">
<asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
</span>
- <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification"
- ValidationGroup="RegisterUserValidationGroup"/>
+ <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification"
+ ValidationGroup="RegisterUserValidationGroup" />
<div class="accountInfo">
<fieldset class="register">
<legend>帐户信息</legend>
<p>
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">用户名:</asp:Label>
<asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
- <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
- CssClass="failureNotification" ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。"
- ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
+ CssClass="failureNotification" ErrorMessage="必须填写“用户名”。" ToolTip="必须填写“用户名”。"
+ ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">电子邮件:</asp:Label>
<asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
- <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
- CssClass="failureNotification" ErrorMessage="必须填写“电子邮件”。" ToolTip="必须填写“电子邮件”。"
- ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
+ CssClass="failureNotification" ErrorMessage="必须填写“电子邮件”。" ToolTip="必须填写“电子邮件”。"
+ ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">密码:</asp:Label>
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
- <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
- CssClass="failureNotification" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。"
- ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
+ CssClass="failureNotification" ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">确认密码:</asp:Label>
<asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
- <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
- ErrorMessage="必须填写“确认密码”。" ID="ConfirmPasswordRequired" runat="server"
- ToolTip="必须填写“确认密码”。" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
- <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword"
- CssClass="failureNotification" Display="Dynamic" ErrorMessage="“密码”和“确认密码”必须匹配。"
- ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
+ <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification"
+ Display="Dynamic" ErrorMessage="必须填写“确认密码”。" ID="ConfirmPasswordRequired" runat="server"
+ ToolTip="必须填写“确认密码”。" ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
+ <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
+ ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
+ ErrorMessage="“密码”和“确认密码”必须匹配。" ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
</p>
</fieldset>
<p class="submitButton">
- <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="创建用户"
- ValidationGroup="RegisterUserValidationGroup"/>
+ <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="创建用户"
+ ValidationGroup="RegisterUserValidationGroup" />
</p>
</div>
</ContentTemplate>
View
6 WebSite/WebSite/BLL/DiscountBL.cs
@@ -32,11 +32,7 @@ public IEnumerable<Discount> GetDiscounts()
return mRepository.GetDiscounts();
}
- public IEnumerable<Discount> GetDiscountsByDate(DateTime date)
- {
- return GetDiscounts().Where(discount => discount.createdAt == date);
- }
-
+
public void InsertDiscount(Discount discount)
{
try
View
11 WebSite/WebSite/NFCShoppingWebSite.csproj
@@ -59,6 +59,7 @@
<Content Include="Account\ChangePassword.aspx" />
<Content Include="Account\ChangePasswordSuccess.aspx" />
<Content Include="Account\Login.aspx" />
+ <Content Include="Account\PasswordRecovery.aspx" />
<Content Include="Account\Register.aspx" />
<Content Include="App_Data\ShopDB.mdf" />
<Content Include="App_Data\ShopDB_log.ldf">
@@ -134,6 +135,13 @@
<Compile Include="Account\Login.aspx.designer.cs">
<DependentUpon>Login.aspx</DependentUpon>
</Compile>
+ <Compile Include="Account\PasswordRecovery.aspx.cs">
+ <DependentUpon>PasswordRecovery.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="Account\PasswordRecovery.aspx.designer.cs">
+ <DependentUpon>PasswordRecovery.aspx</DependentUpon>
+ </Compile>
<Compile Include="Account\Register.aspx.cs">
<DependentUpon>Register.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -278,6 +286,9 @@
<Content Include="Styles\Site.Master" />
</ItemGroup>
<ItemGroup>
+ <Folder Include="Images\Temp\" />
+ </ItemGroup>
+ <ItemGroup>
<EntityDeploy Include="Access_Data\ShopEntities.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>ShopEntities.Designer.cs</LastGenOutput>
View
3  WebSite/WebSite/NFCShoppingWebSite.csproj.user
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectView>ShowAllFiles</ProjectView>
+ </PropertyGroup>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
View
2  WebSite/WebSite/Styles/Site.Master
@@ -29,7 +29,7 @@
</span>! [
<asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="注销"
LogoutPageUrl="~/" />
- ]
+ ][ <a href="~/Account/ChangePassword.aspx" id="A1" runat="server">修改密码</a>]
</LoggedInTemplate>
</asp:LoginView>
</div>
View
34 WebSite/WebSite/Styles/Site.Master.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
+// <自动生成>
+// 此代码由工具生成。
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+// </自动生成>
//------------------------------------------------------------------------------
namespace NFCShoppingWebSite {
@@ -13,38 +13,38 @@ namespace NFCShoppingWebSite {
public partial class SiteMaster {
/// <summary>
- /// HeadContent control.
+ /// HeadContent 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
/// <summary>
- /// HeadLoginView control.
+ /// HeadLoginView 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.LoginView HeadLoginView;
/// <summary>
- /// NavigationMenu control.
+ /// NavigationMenu 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Menu NavigationMenu;
/// <summary>
- /// MainContent control.
+ /// MainContent 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
}
View
37 WebSite/WebSite/Web.config
@@ -8,46 +8,44 @@
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>
<connectionStrings>
- <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
- <add name="ShopEntities" connectionString="metadata=res://*/Access_Data.ShopEntities.csdl|res://*/Access_Data.ShopEntities.ssdl|res://*/Access_Data.ShopEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ShopDB.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient"/>
- </connectionStrings>
+ <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
+
+ <add name="ShopEntities" connectionString="metadata=res://*/Access_Data.ShopEntities.csdl|res://*/Access_Data.ShopEntities.ssdl|res://*/Access_Data.ShopEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ShopDB.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
<system.web>
<httpHandlers>
- <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
- validate="false" />
+ <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
</httpHandlers>
<pages>
<controls>
- <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
- assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
- <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
- <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
+ <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="Forms">
- <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
+ <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
- <clear/>
- <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
+ <clear />
+ <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
- <clear/>
- <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
+ <clear />
+ <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
- <roleManager enabled="false">
+ <roleManager enabled="true">
<providers>
- <clear/>
- <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
- <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
+ <clear />
+ <add connectionStringName="ApplicationServices" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
+ <add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" />
</providers>
</roleManager>
</system.web>
@@ -55,8 +53,7 @@
<modules runAllManagedModulesForAllRequests="true" />
<handlers>
<remove name="ChartImageHandler" />
- <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
- path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>
</configuration>
View
1  WebSite/WebSite/WebPages/DiscountAdd.aspx.cs
@@ -25,7 +25,6 @@ protected void SubmitButton_Click(object sender, EventArgs e)
Discount discount = new Discount();
discount.description = this.DiscountDescriptionTextBox.Text;
- discount.createdAt = Convert.ToDateTime(this.CreatedTextBox.Text);
mDiscounts.InsertDiscount(discount);
mDiscounts.Dispose();
Response.Redirect("~/WebPages/Discounts.aspx");
View
4 WebSite/WebSite/WebPages/DiscountDetails.aspx
@@ -28,9 +28,11 @@
<asp:Label ID="TitleLabel" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="Black"
Text='<%# Eval("description") %>'></asp:Label>
<div>
+ <asp:Label ID="CreatingDateLabel" runat="server" Text='<%# Eval("startDate") %>'></asp:Label>
</div>
- <asp:Label ID="CreatingDateLabel" runat="server" Text='<%# Eval("createdAt") %>'></asp:Label>
+
<div>
+ <asp:Label ID="Label2" runat="server" Text='<%# Eval("endDate") %>'></asp:Label>
</div>
</div>
</div>
View
22 WebSite/WebSite/WebPages/DiscountDetails.aspx.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
+// <自动生成>
+// 此代码由工具生成。
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
+// 对此文件的更改可能会导致不正确的行为,并且如果
+// 重新生成代码,这些更改将会丢失。
+// </自动生成>
//------------------------------------------------------------------------------
namespace NFCShoppingWebSite.WebPages {
@@ -13,20 +13,20 @@ namespace NFCShoppingWebSite.WebPages {
public partial class DiscountDetails {
/// <summary>
- /// DiscountsDataSource control.
+ /// DiscountsDataSource 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ObjectDataSource DiscountsDataSource;
/// <summary>
- /// ListView1 control.
+ /// ListView1 控件。
/// </summary>
/// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.ListView ListView1;
View
4 WebSite/WebSite/WebPages/DiscountItemEdit.aspx.cs
@@ -40,9 +40,7 @@ protected void EditButton_Click(object sender, EventArgs e)
discountItem.discountPercent = Convert.ToSingle(this.DiscountPercentTextBox.Text);
discountItem.description = this.DiscountItemDescriptionTextBox.Text;
- discountItem.startDate = Convert.ToDateTime(this.StartDateTextBox.Text);
- discountItem.endDate = Convert.ToDateTime(this.EndDateTextBox.Text);
-
+
DiscountItem origDiscountItem = GetDiscountItem();
discountItem.id = origDiscountItem.id;
mDiscountItems.UpdateDiscountItem(discountItem, origDiscountItem);
View
3  WebSite/WebSite/WebPages/web.config
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+</configuration>
View
2  mobile phone client/NFCShopping/AndroidManifest.xml
@@ -4,7 +4,7 @@
android:versionCode="1"
android:versionName="1.0" >
- <uses-sdk android:minSdkVersion="8" />
+ <uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET" >
</uses-permission>
View
106 mobile phone client/NFCShopping/gen/scut/bgooo/ui/R.java
@@ -343,40 +343,40 @@
}
public static final class id {
public static final int HorizontalScrollView01=0x7f060029;
- public static final int add=0x7f060062;
- public static final int btAddToCompare=0x7f060050;
- public static final int btCheckComment=0x7f060051;
+ public static final int add=0x7f060060;
+ public static final int btAddToCompare=0x7f06004e;
+ public static final int btCheckComment=0x7f06004f;
public static final int btComment=0x7f060025;
public static final int btCommit=0x7f060015;
public static final int btFinish=0x7f060024;
- public static final int btLogin=0x7f060040;
- public static final int btRegist=0x7f060041;
+ public static final int btLogin=0x7f06003e;
+ public static final int btRegist=0x7f06003f;
public static final int btShare=0x7f060026;
public static final int btShareAndCommit=0x7f060016;
public static final int cbStar=0x7f060022;
- public static final int checkBox1=0x7f060067;
- public static final int clear=0x7f060060;
+ public static final int checkBox1=0x7f060065;
+ public static final int clear=0x7f06005e;
public static final int comment_listview=0x7f060028;
- public static final int del=0x7f060061;
+ public static final int del=0x7f06005f;
public static final int discount_discription=0x7f06000c;
public static final int discount_image=0x7f06000b;
public static final int discount_time=0x7f06000d;
- public static final int discountshit_listview=0x7f060036;
+ public static final int discountshit_listview=0x7f060034;
public static final int etComment=0x7f060017;
- public static final int etPassword=0x7f06003f;
- public static final int etUsername=0x7f06003e;
- public static final int fbcancle=0x7f06003c;
- public static final int fbconfirm=0x7f06003b;
- public static final int fbedit=0x7f06003d;
- public static final int female=0x7f06005d;
+ public static final int etPassword=0x7f06003d;
+ public static final int etUsername=0x7f06003c;
+ public static final int fbcancle=0x7f06003a;
+ public static final int fbconfirm=0x7f060039;
+ public static final int fbedit=0x7f06003b;
+ public static final int female=0x7f06005b;
public static final int goods_image=0x7f060006;
public static final int goods_name=0x7f060000;
public static final int goods_price=0x7f060002;
public static final int goods_score=0x7f060004;
public static final int imageView1=0x7f060031;
- public static final int imageView2=0x7f06003a;
+ public static final int imageView2=0x7f060038;
public static final int indicator_ratingbar=0x7f06001a;
- public static final int ivPicture=0x7f060049;
+ public static final int ivPicture=0x7f060047;
public static final int ivProduct=0x7f06001d;
public static final int ivProductImage=0x7f06002e;
public static final int linearLayout1=0x7f06000f;
@@ -384,68 +384,66 @@
public static final int linearLayout3=0x7f06001e;
public static final int linearLayout4=0x7f06001f;
public static final int linearLayout5=0x7f060021;
- public static final int linearLayout6=0x7f060032;
- public static final int linearLayout_sex=0x7f060059;
+ public static final int linearLayout_sex=0x7f060057;
public static final int listView1=0x7f06002c;
public static final int listView2=0x7f06000e;
public static final int llProduct=0x7f06001c;
public static final int lvCompare=0x7f06002a;
public static final int lybuttonBar=0x7f060014;
- public static final int male=0x7f06005c;
+ public static final int male=0x7f06005a;
public static final int name=0x7f060001;
- public static final int other=0x7f06005e;
+ public static final int other=0x7f06005c;
public static final int price=0x7f060003;
- public static final int privilege_listview=0x7f060034;
+ public static final int privilege_listview=0x7f060032;
public static final int progress=0x7f060027;
- public static final int progress1=0x7f060037;
- public static final int progress2=0x7f060035;
- public static final int progressBar=0x7f060052;
- public static final int progress_tv=0x7f060053;
- public static final int radioGroup_gender=0x7f06005b;
+ public static final int progress1=0x7f060035;
+ public static final int progress2=0x7f060033;
+ public static final int progressBar=0x7f060050;
+ public static final int progress_tv=0x7f060051;
+ public static final int radioGroup_gender=0x7f060059;
public static final int ratingbar=0x7f060012;
public static final int recancle=0x7f06000a;
public static final int reconfirm=0x7f060009;
public static final int relativeLayout1=0x7f060013;
public static final int relativeLayout2=0x7f060023;
public static final int repassword=0x7f060008;
- public static final int repassword1=0x7f060057;
- public static final int repassword2=0x7f060058;
+ public static final int repassword1=0x7f060055;
+ public static final int repassword2=0x7f060056;
public static final int reuser=0x7f060007;
public static final int score=0x7f060005;
- public static final int scrollView=0x7f060048;
- public static final int scrollView1=0x7f060054;
- public static final int tab1=0x7f060042;
- public static final int tab2=0x7f060043;
- public static final int tab3=0x7f060044;
- public static final int tab4=0x7f060045;
- public static final int tab5=0x7f060046;
- public static final int textView1=0x7f060056;
- public static final int textView2=0x7f060038;
- public static final int textView4=0x7f060039;
- public static final int text_sex=0x7f06005a;
- public static final int title=0x7f060055;
- public static final int tvBarcode=0x7f06004c;
- public static final int tvBrand=0x7f06004a;
+ public static final int scrollView=0x7f060046;
+ public static final int scrollView1=0x7f060052;
+ public static final int tab1=0x7f060040;
+ public static final int tab2=0x7f060041;
+ public static final int tab3=0x7f060042;
+ public static final int tab4=0x7f060043;
+ public static final int tab5=0x7f060044;
+ public static final int textView1=0x7f060054;
+ public static final int textView2=0x7f060036;
+ public static final int textView4=0x7f060037;
+ public static final int text_sex=0x7f060058;
+ public static final int title=0x7f060053;
+ public static final int tvBarcode=0x7f06004a;
+ public static final int tvBrand=0x7f060048;
public static final int tvComment=0x7f06001b;
public static final int tvCreatedDate=0x7f060019;
public static final int tvDatetag=0x7f06002d;
- public static final int tvDescription=0x7f06004e;
+ public static final int tvDescription=0x7f06004c;
public static final int tvDiscount=0x7f060030;
- public static final int tvDuration=0x7f060033;
public static final int tvEmpty=0x7f06002b;
- public static final int tvItemContent=0x7f060047;
- public static final int tvLocation=0x7f06004f;
- public static final int tvPrice=0x7f06004d;
+ public static final int tvItemContent=0x7f060045;
+ public static final int tvLocation=0x7f06004d;
+ public static final int tvPrice=0x7f06004b;
public static final int tvPrivilegeCost=0x7f06002f;
public static final int tvProductname=0x7f060010;
- public static final int tvType=0x7f06004b;
+ public static final int tvType=0x7f060049;
public static final int tvUsername=0x7f060018;
public static final int tvproductCost=0x7f060020;
- public static final int user=0x7f06005f;
- public static final int usericon=0x7f060064;
- public static final int userlocation=0x7f060066;
- public static final int username=0x7f060065;
- public static final int webView1=0x7f060063;
+ public static final int user=0x7f06005d;
+ public static final int usericon=0x7f060062;
+ public static final int userlocation=0x7f060064;
+ public static final int username=0x7f060063;
+ public static final int webView1=0x7f060061;
}
public static final class layout {
public static final int collect=0x7f030000;
View
2  mobile phone client/NFCShopping/res/layout/comment.xml
@@ -22,7 +22,7 @@
android:id="@+id/tvProductname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="Lee"
+ android:text="暂无数据"
android:textAppearance="?android:attr/textAppearanceLarge"
/>
</LinearLayout>
View
2  mobile phone client/NFCShopping/res/layout/datetagitemview.xml
@@ -5,7 +5,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dip"
- android:background="#1E90FF"
+ android:background="#696969"
>
<TextView
android:id="@+id/tvDatetag"
View
22 mobile phone client/NFCShopping/res/layout/discountitem.xml
@@ -14,7 +14,7 @@
android:layout_width="75dip"
android:layout_height="75dip"
android:padding="5dip"
- android:src="@drawable/weiqun" />
+ android:src="@android:drawable/ic_menu_gallery"/>
<LinearLayout
android:id="@+id/linearLayout1"
@@ -104,24 +104,4 @@
</RelativeLayout>
</LinearLayout>
- <LinearLayout
- android:id="@+id/linearLayout6"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/duration"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <TextView
- android:id="@+id/tvDuration"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="活动时间" />
- </LinearLayout>
-
</LinearLayout>
View
7 mobile phone client/NFCShopping/res/layout/discountshititem.xml
@@ -11,8 +11,8 @@
<ImageView
android:id="@id/discount_image"
- android:layout_width="50dip"
- android:layout_height="50dip"
+ android:layout_width="75dip"
+ android:layout_height="75dip"
android:padding="5dip"
android:src="@drawable/pig" >
</ImageView>
@@ -54,7 +54,8 @@
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="创建时间:" >
+ android:layout_gravity="center_vertical"
+ android:text="优惠时间:" >
</TextView>
<TextView
View
4 mobile phone client/NFCShopping/res/layout/itemview.xml
@@ -11,8 +11,8 @@
android:id="@id/goods_image"
android:layout_width="50.0dip"
android:layout_height="50.0dip"
- android:layout_marginLeft="5.0dip"
- android:layout_marginTop="5.0dip"
+ android:background="@drawable/search_bg"
+ android:padding="5dip"
android:saveEnabled="true" />
<LinearLayout
View
11 mobile phone client/NFCShopping/res/layout/productitem.xml
@@ -9,9 +9,9 @@
android:id="@id/goods_image"
android:layout_width="50.0dip"
android:layout_height="50.0dip"
- android:layout_marginLeft="5.0dip"
- android:layout_marginTop="5.0dip"
- android:background="@drawable/weiqun"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="5dip"
+ android:src="@android:drawable/ic_menu_gallery"
android:saveEnabled="true" />
<LinearLayout
@@ -75,9 +75,9 @@
android:id="@id/goods_score"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
android:layout_gravity="left"
- android:layout_marginRight="10.0dip"
- android:text="平均得分"
+ android:text="平均评分"
android:textSize="15.0sp" />
<!-- 得分条 -->
@@ -86,6 +86,7 @@
style="?android:attr/ratingBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
android:layout_toRightOf="@id/goods_score"
android:numStars="5"
android:rating="3" />
View
20 mobile phone client/NFCShopping/src/scut/bgooo/concern/ConcernItem.java
@@ -56,10 +56,16 @@ public static int getCount() {
/**
* 这个是从数据库获取item的构造函数,要传入id
* */
+
+ /**
+ *商品图片
+ */
+ private byte [] icon;
+
public ConcernItem(int id, int productId, String name, int type,
String seccategory, float price, float rating, String brand,
String location, String barcode, String description,
- long timestamp, short iscollected) {
+ long timestamp, short iscollected, byte[] data) {
Id = id;
ProductId = productId;
Name = name;
@@ -73,6 +79,7 @@ public ConcernItem(int id, int productId, String name, int type,
setDescription(description);
Timestamp = timestamp;
IsCollected = iscollected;
+ icon = data;
}
public ConcernItem(long timestamp) {
@@ -104,6 +111,9 @@ public Object getAttribute(int index) {
case 6:
temp = getRating();
break;
+ case 7: {
+ temp = getIcon();
+ }break;
default:
break;
}
@@ -161,6 +171,10 @@ public long getTimestamp() {
public int getType() {
return Type;
}
+
+ public byte[] getIcon() {
+ return icon;
+ }
public void setBarcode(String barcode) {
Barcode = barcode;
@@ -193,4 +207,8 @@ public void setRating(float rating) {
public void setSecCategory(String secCategory) {
SecCategory = secCategory;
}
+
+ public void setIcon(byte[] data) {
+ icon = data;
+ }
}
View
6 mobile phone client/NFCShopping/src/scut/bgooo/concern/ConcernItemAdapter.java
@@ -7,6 +7,8 @@
import scut.bgooo.ui.R;
import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -84,7 +86,9 @@ public View getView(int position, View convertView, ViewGroup parent) {
vh.mGoodsPrice = (TextView) concernitem.findViewById(R.id.price);
ConcernItem item = mItems.get(position);
- vh.mImageView.setBackgroundColor(R.drawable.logo);
+ byte [] data = item.getIcon();
+ Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
+ vh.mImageView.setImageBitmap(bitmap);
vh.mGoodScore.setRating(item.getRating());
vh.mGoodsNmae.setText(item.getName());
vh.mGoodsPrice.setText(String.valueOf(item.getPrice()));
View
18 mobile phone client/NFCShopping/src/scut/bgooo/concern/ConcernManager.java
@@ -34,7 +34,7 @@
DBHelper.PRICE_COL, DBHelper.RATING_COL, DBHelper.TIMESTAMP_COL,
DBHelper.ISCOLLECTED_COL, DBHelper.BRAND_COL,
DBHelper.LOCATION_COL, DBHelper.BARCODE_COL,
- DBHelper.SECCATEGORY_COL, DBHelper.DESCRIPTION_COL };
+ DBHelper.SECCATEGORY_COL, DBHelper.DESCRIPTION_COL , DBHelper.CONCERN_PRODUCTIMAGE};
private static final String[] COUNT_COLUMN = { "COUNT(1)" };
@@ -110,6 +110,7 @@ public boolean hasConcernItems() {
String barcode = cursor.getString(10);
String category = cursor.getString(11);
String description = cursor.getString(12);
+ byte[] data = cursor.getBlob(13);
// 添加时间标签的代码段
// 用来根据刷卡的日期进行日期归类
scanDate = new Date(timestamp);
@@ -122,7 +123,7 @@ public boolean hasConcernItems() {
// 这里还需要补充ConcernItem对象的具体属性才能确定
items.add(new ConcernItem(id, pid, name, type, category, price,
rating, brand, location, barcode, description,
- timestamp, iscollected));
+ timestamp, iscollected, data));
}
return items;
} catch (ParseException e) {
@@ -164,6 +165,7 @@ public boolean hasConcernItems() {
String barcode = cursor.getString(10);
String category = cursor.getString(11);
String description = cursor.getString(12);
+ byte[] data = cursor.getBlob(13);
// 添加时间标签的代码段
// 用来根据刷卡的日期进行日期归类
scanDate = new Date(timestamp);
@@ -173,9 +175,9 @@ public boolean hasConcernItems() {
Date tag = formater.parse(date);
items.add(new ConcernItem(tag.getTime()));
}
- items.add(new ConcernItem(id, pid, name, type, category, price,
+ items.add(new ConcernItem(id, pid, name, type, category, price,
rating, brand, location, barcode, description,
- timestamp, iscollected));
+ timestamp, iscollected, data));
}
return items;
} catch (ParseException e) {
@@ -211,10 +213,11 @@ public ConcernItem buildConcernItem(int number) {
String barcode = cursor.getString(10);
String category = cursor.getString(11);
String description = cursor.getString(12);
+ byte[] data = cursor.getBlob(13);
// 这里还需要补充ConcernItem对象的具体属性才能确定
return new ConcernItem(id, pid, name, type, category, price,
rating, brand, location, barcode, description, timestamp,
- iscollected);
+ iscollected, data);
} finally {
close(cursor, db);
}
@@ -253,10 +256,11 @@ public ConcernItem buildConcernItemById(int id) {
String barcode = cursor.getString(10);
String category = cursor.getString(11);
String description = cursor.getString(12);
+ byte[] data = cursor.getBlob(13);
// 这里还需要补充ConcernItem对象的具体属性才能确定
return new ConcernItem(id, pid, name, type, category, price,
rating, brand, location, barcode, description, timestamp,
- iscollected);
+ iscollected, data);
} finally {
close(cursor, db);
}
@@ -364,7 +368,7 @@ public void addConcernItem(ConcernItem item) {
values.put(DBHelper.ISCOLLECTED_COL, item.getIsCollected());
values.put(DBHelper.SECCATEGORY_COL, item.getSecCategory());
values.put(DBHelper.DESCRIPTION_COL, item.getDescription());
-
+ values.put(DBHelper.CONCERN_PRODUCTIMAGE, item.getIcon());
try {
db = helper.getWritableDatabase();
cursor = db.query(DBHelper.CONCERN_TABLE_NAME,
View
3  mobile phone client/NFCShopping/src/scut/bgooo/db/DBHelper.java
@@ -38,6 +38,7 @@
public static final String END_TIMESTAMP_COL = "endtimestamp";
public static final String TIMESTAMP_COL = "timestamp";
public static final String ISCOLLECTED_COL = "collected";
+ public static final String CONCERN_PRODUCTIMAGE = "icon";
public DBHelper(Context context, String name, CursorFactory factory,
int version) {
@@ -65,7 +66,7 @@ public void onCreate(SQLiteDatabase db) {
+ " REAL, " + RATING_COL + " REAL, " + BRAND_COL + " varchar, "
+ LOCATION_COL + " varchar, " + BARCODE_COL + " varchar, "
+ DESCRIPTION_COL + " varchar, " + TIMESTAMP_COL + " INTEGER, "
- + ISCOLLECTED_COL + " INTEGER);");
+ + ISCOLLECTED_COL + " INTEGER," + CONCERN_PRODUCTIMAGE + " blob);");
Log.e("Database", "onCreate");
}
View
18 mobile phone client/NFCShopping/src/scut/bgooo/db/TransistionUtil.java
@@ -0,0 +1,18 @@
+package scut.bgooo.db;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+
+public class TransistionUtil {
+
+ public static char[] getChars(byte[] bytes) {
+ Charset cs = Charset.forName("GBK");
+ ByteBuffer bb = ByteBuffer.allocate(bytes.length);
+ bb.put(bytes);
+ bb.flip();
+ CharBuffer cb = cs.decode(bb);
+
+ return cb.array();
+ }
+}
View
8 mobile phone client/NFCShopping/src/scut/bgooo/db/UserProfileUtil.java
@@ -11,9 +11,11 @@
public static void saveProfile(Context con, User user, String password) {
SharedPreferences sp = con.getSharedPreferences("profile",
Context.MODE_PRIVATE);
- sp.edit().putString("username", user.getProperty(2).toString())
- .putString("password", password)
- .putInt("id", (Integer) user.getProperty(1)).commit();
+ if (user != null) {
+ sp.edit().putString("username", user.getProperty(2).toString())
+ .putString("password", password)
+ .putInt("id", (Integer) user.getProperty(1)).commit();
+ }
}
// 读取用户验证的Access Token
View
21 mobile phone client/NFCShopping/src/scut/bgooo/entities/Discount.java
@@ -23,7 +23,8 @@
private int Id; // 优惠ID,就是对应的优惠列表的id
private String EntityKey;
private String Description;//优惠描述
- private String CreatedAt;//创建时间
+ private String StartDate;
+ private String EndDate;
@Override
public Object getProperty(int arg0) {
@@ -40,7 +41,10 @@ public Object getProperty(int arg0) {
res = this.Description;
break;
case 3:
- res = this.CreatedAt;
+ res = this.StartDate;
+ break;
+ case 4:
+ res = this.EndDate;
break;
default:
break;
@@ -51,7 +55,7 @@ public Object getProperty(int arg0) {
@Override
public int getPropertyCount() {
// TODO Auto-generated method stub
- return 4;
+ return 5;
}
@Override
@@ -72,7 +76,11 @@ public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {
break;
case 3:
arg2.type = PropertyInfo.STRING_CLASS;
- arg2.name = "createdAt";
+ arg2.name = "startDate";
+ break;
+ case 4:
+ arg2.type = PropertyInfo.STRING_CLASS;
+ arg2.name = "endDate";
break;
default:
break;
@@ -95,7 +103,10 @@ public void setProperty(int arg0, Object arg1) {
this.Description=arg1.toString();
break;
case 3:
- this.CreatedAt=arg1.toString();
+ this.StartDate=arg1.toString();
+ break;
+ case 4:
+ this.EndDate=arg1.toString();
break;
default:
break;
View
29 mobile phone client/NFCShopping/src/scut/bgooo/entities/DiscountItem.java
@@ -15,13 +15,16 @@
*/
public class DiscountItem implements KvmSerializable ,Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
private int Id;
private int ProductId;
private int DiscountId;
private float Percent;
private String Description;
- private String StartDate;
- private String EndDate;
private String EntityKey;
public Product Product;
@@ -50,12 +53,6 @@ public Object getProperty(int arg0) {
res = this.Description;
break;
case 6:
- res = this.StartDate;
- break;
- case 7:
- res = this.EndDate;
- break;
- case 8:
res = this.Product;
break;
default:
@@ -67,7 +64,7 @@ public Object getProperty(int arg0) {
@Override
public int getPropertyCount() {
// TODO Auto-generated method stub
- return 9;
+ return 7;
}
@Override
@@ -99,14 +96,6 @@ public void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {
arg2.name = "description";
break;
case 6:
- arg2.type = PropertyInfo.STRING_CLASS;
- arg2.name = "startDate";
- break;
- case 7:
- arg2.type = PropertyInfo.STRING_CLASS;
- arg2.name = "endDate";
- break;
- case 8:
arg2.type = PropertyInfo.OBJECT_CLASS;
arg2.name = "Product";
break;
@@ -141,12 +130,6 @@ public void setProperty(int arg0, Object arg1) {
this.Description = arg1.toString();
break;
case 6:
- this.StartDate = arg1.toString();
- break;
- case 7:
- this.EndDate = arg1.toString();
- break;
- case 8:
this.Product = (Product) arg1;
break;
default:
View
1  mobile phone client/NFCShopping/src/scut/bgooo/ui/CollectionListActivity.java
@@ -178,6 +178,7 @@ public void onItemClick(AdapterView<?> arg0, View arg1, int position,
CommentListActivity.class);
intent.putExtra("mItem", mItems.get(position));
startActivity(intent);
+
}
};
View
6 mobile phone client/NFCShopping/src/scut/bgooo/ui/CommentActivity.java
@@ -64,8 +64,10 @@ protected void onCreate(Bundle savedInstanceState) {
mShareCommitButton = (Button) findViewById(R.id.btShareAndCommit);
mCommitButton = (Button) findViewById(R.id.btCommit);
mRatingbar = (RatingBar) findViewById(R.id.ratingbar);
- // mWeibo = (Weibo)bundle.get("WEIBO");
-
+
+ mProductName=(TextView)findViewById(R.id.tvProductname);
+ mProductName.setText(mItem.getName());
+
System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
System.setProperty("weibo4j.oauth.consumerSecret",
Weibo.CONSUMER_SECRET);
View
24 mobile phone client/NFCShopping/src/scut/bgooo/ui/CommentListActivity.java
@@ -19,6 +19,8 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
import android.nfc.NfcAdapter;
import android.os.Bundle;
import android.os.Handler;
@@ -32,6 +34,7 @@
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
+import android.widget.ImageView;
import android.widget.Toast;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ListView;
@@ -46,7 +49,7 @@
protected static final int REFRESHREVIEWSFAILE = 1;
protected static final int REFRESHRATING = 2;
- private float mRating=0.0f;