From 89497e0cac847c22d7cff3a040783f39d162eb56 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 22 Mar 2017 17:21:13 -0400 Subject: [PATCH] update all styles for edit These will be reused for insert --- .../Catalog.WebForms/Catalog.WebForms.csproj | 1 + .../Content/app.component.css | 4 ++ .../Catalog.WebForms/Default.aspx | 2 +- .../Catalog.WebForms/Default.aspx.cs | 4 +- .../Catalog.WebForms/EditCatalogItem.aspx | 68 ++++++++++++------- .../Catalog.WebForms/EditCatalogItem.aspx.cs | 6 +- .../Catalog.WebForms/Web.config | 2 +- 7 files changed, 56 insertions(+), 31 deletions(-) diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj b/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj index f2065f73e..24af1431f 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj @@ -56,6 +56,7 @@ + diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Content/app.component.css b/src/Web/Catalog.WebForms/Catalog.WebForms/Content/app.component.css index f56ff7d3b..23bbbe44f 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Content/app.component.css +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Content/app.component.css @@ -18,3 +18,7 @@ text-align: right; width: 100%; } + +.table-full-width { + width: 100%; +} diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx index 14f353e4e..7ff40d5c0 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx @@ -4,7 +4,7 @@ + ItemType="eShopOnContainers.Core.Models.Catalog.CatalogItem" SelectMethod="GetCatalogDataAsync" DeleteMethod="DeleteCatalogItemAsync">
There's nothing in the catalog to display at this time. diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs index b2c90de7c..a74ed8e82 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs @@ -33,13 +33,13 @@ namespace eShopOnContainers.Catalog.WebForms // int startRowIndex // out int totalRowCount // string sortByExpression - public async Task> catalogList_GetData() + public async Task> GetCatalogDataAsync() { return await catalog?.GetCatalogAsync(); } // The id parameter name should match the DataKeyNames value set on the control - public async Task catalogList_DeleteItem(int id) + public async Task DeleteCatalogItemAsync(int id) { //TODO: Call the service. } diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx b/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx index c26d5673a..1cbbbc206 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx @@ -1,41 +1,61 @@ <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EditCatalogItem.aspx.cs" Inherits="eShopOnContainers.Catalog.WebForms.EditCatalogItem" Async="true" %> + - + -
-
-
-
- - +
+
+ +
+
+
+
+
+ +
-
- - +
+
+
+ +
-
- - +
+
+
+ +
-
+
+
+
-
+
+
+
-
- This is where the picture to edit goes +
+
+
+ +
+
+
- +
-
- +
+
diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx.cs index 31f67a0fa..cac49819a 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx.cs +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/EditCatalogItem.aspx.cs @@ -32,7 +32,7 @@ namespace eShopOnContainers.Catalog.WebForms // The id parameter should match the DataKeyNames value set on the control // or be decorated with a value provider attribute, e.g. [QueryString]int id - public async Task EditCatalogItemForm_GetItem([QueryString]int id) + public async Task GetCatalogItemAsync([QueryString]int id) { // TODO: If null, go into insert mode. var itemToEdit = await catalog?.GetCatalogItemAsync(id.ToString()); @@ -40,7 +40,7 @@ namespace eShopOnContainers.Catalog.WebForms } // The id parameter name should match the DataKeyNames value set on the control - public void EditCatalogItemForm_UpdateItem(int id) + public void UpdateCatalogItemAsync(int id) { eShopOnContainers.Core.Models.Catalog.CatalogItem item = null; // Load the item here, e.g. item = MyDataLayer.Find(id); @@ -58,7 +58,7 @@ namespace eShopOnContainers.Catalog.WebForms } } - public void EditCatalogItemForm_InsertItem() + public void InsertCatalogItemAsync() { var item = new eShopOnContainers.Core.Models.Catalog.CatalogItem(); TryUpdateModel(item); diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config b/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config index ddc1f540f..46d4ab24e 100644 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config +++ b/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config @@ -72,7 +72,7 @@ - +