|
From: <all...@us...> - 2010-03-25 21:49:07
|
Revision: 38
http://cronoscontrol.svn.sourceforge.net/cronoscontrol/?rev=38&view=rev
Author: allancascante
Date: 2010-03-25 21:49:00 +0000 (Thu, 25 Mar 2010)
Log Message:
-----------
Ticket #9:
Added support to list, view and view edit form (missing new and save edited data) for companies.
+Business.cs: Fixed an error on generic get method.
+Companies.cs: Added the support for the list methods.
+CompaniesController.cs: Added controller methods.
+Views/Companies/Details.aspx, Edit.aspx, List.aspx: Added the new views for the maintenance.
Ticket #10:
Added some new files for the task tracking functioanlity and modified some of the methods, this functionality is still under development.
+Tasks.cs: Added some methods to list the tasks for different scenarios.
+DateTimeExtensions.cs: Added some extensions to get week start and end dates.
+TasksController.cs: Added controller methods for the views on Task Tracking.
+Site.Master: Added a section for custom css files
+TaskTracking.aspx: Added the custom css section an other changes.
Ticket #8:
+TimeCategoryController.cs: Added some changes to the controller methods.
TimeCategoryList.aspx: Added some minor changes to the list view.
Modified Paths:
--------------
source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Business.cs
source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Companies.cs
source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Tasks.cs
source/trunk/CronosControl/CronosControlBusinessClassLibrary/CronosControlBusinessClassLibrary.csproj
source/trunk/CronosControl/CronosControlWeb/Controllers/TimeCategoryController.cs
source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj
source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master
source/trunk/CronosControl/CronosControlWeb/Views/TimeCategory/TimeCategoryList.aspx
Added Paths:
-----------
source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Util/ExtensionMethods/
source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Util/ExtensionMethods/DateTimeExtensions.cs
source/trunk/CronosControl/CronosControlWeb/Content/TasksTracking.css
source/trunk/CronosControl/CronosControlWeb/Controllers/CompaniesController.cs
source/trunk/CronosControl/CronosControlWeb/Controllers/TasksController.cs
source/trunk/CronosControl/CronosControlWeb/Views/Companies/
source/trunk/CronosControl/CronosControlWeb/Views/Companies/Details.aspx
source/trunk/CronosControl/CronosControlWeb/Views/Companies/Edit.aspx
source/trunk/CronosControl/CronosControlWeb/Views/Companies/List.aspx
source/trunk/CronosControl/CronosControlWeb/Views/Tasks/
source/trunk/CronosControl/CronosControlWeb/Views/Tasks/TasksTracking.aspx
Modified: source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Business.cs
===================================================================
--- source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Business.cs 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Business.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -59,7 +59,6 @@
Object savedEntity = null;
if (entity.EntityKey != null && cronosControlEntities.TryGetObjectByKey(entity.EntityKey, out savedEntity))
{
- CronosControlEntitiesContext.Detach(savedEntity);
return (T)savedEntity;
}
else
Modified: source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Companies.cs
===================================================================
--- source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Companies.cs 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Companies.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -26,14 +26,31 @@
}
#region Business<Company> abstract methods
+
+ /// <summary>
+ /// Get the list of all Companies in the system
+ /// </summary>
+ /// <returns>A List of all Companies</returns>
public override List<Company> List()
{
- throw new NotImplementedException();
+ using (CronosControlEntitiesContext)
+ {
+ return CronosControlEntitiesContext.Company.ToList();
+ }
}
+ /// <summary>
+ /// Get a sub set of all companies on the system.
+ /// </summary>
+ /// <param name="page">The page to get</param>
+ /// <param name="elements">The number of elements by page</param>
+ /// <returns>The page for the given parameters</returns>
public override List<Company> List(int page, int elements)
{
- throw new NotImplementedException();
+ using (CronosControlEntitiesContext)
+ {
+ return CronosControlEntitiesContext.Company.Skip(elements * (page - 1)).Take(elements).ToList();
+ }
}
#endregion
}
Modified: source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Tasks.cs
===================================================================
--- source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Tasks.cs 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Tasks.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -18,9 +18,9 @@
/// <returns>A list with all taks</returns>
public override List<Task> List()
{
- using (CronosControlEntities cronosControlEntities = new CronosControlEntities())
+ using (CronosControlEntitiesContext)
{
- return cronosControlEntities.Task.ToList();
+ return CronosControlEntitiesContext.Task.ToList();
}
}
@@ -32,9 +32,9 @@
/// <returns>The page for the given parameters</returns>
public override List<Task> List(int page, int elements)
{
- using (CronosControlEntities cronosControlEntities = new CronosControlEntities())
+ using (CronosControlEntitiesContext)
{
- return cronosControlEntities.Task.Skip(elements * (page - 1)).Take(elements).ToList();
+ return CronosControlEntitiesContext.Task.Skip(elements * (page - 1)).Take(elements).ToList();
}
}
@@ -45,9 +45,9 @@
/// <returns>The list of tasks for the user</returns>
public List<Task> UserTasks(User user)
{
- using (CronosControlEntities cronosControlEntities = new CronosControlEntities())
+ using (CronosControlEntitiesContext)
{
- return (from u in cronosControlEntities.TaskUser
+ return (from u in CronosControlEntitiesContext.TaskUser
where u.User == user
select u.Task).ToList<Task>();
}
@@ -62,9 +62,9 @@
/// <returns>The list of tasks on the given range for the user</returns>
public List<Task> UserTasks(User user, int page, int elements)
{
- using (CronosControlEntities cronosControlEntities = new CronosControlEntities())
+ using (CronosControlEntitiesContext)
{
- return (from u in cronosControlEntities.TaskUser
+ return (from u in CronosControlEntitiesContext.TaskUser
where u.User == user
select u.Task).Skip(elements * (page - 1)).Take(elements).ToList<Task>();
}
@@ -85,9 +85,9 @@
{
throw new ArgumentException("The provided start and end dates are not correct.");
}
- using (CronosControlEntities cronosControlEntities = new CronosControlEntities())
+ using (CronosControlEntitiesContext)
{
- return (from u in cronosControlEntities.TaskUser
+ return (from u in CronosControlEntitiesContext.TaskUser
where u.User == user && u.StartDate >= startDate && u.EndDate <= endDate
select u.Task).Skip(elements * (page - 1)).Take(elements).ToList<Task>();
}
Added: source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Util/ExtensionMethods/DateTimeExtensions.cs
===================================================================
--- source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Util/ExtensionMethods/DateTimeExtensions.cs (rev 0)
+++ source/trunk/CronosControl/CronosControlBusinessClassLibrary/Business/Util/ExtensionMethods/DateTimeExtensions.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace CronosControl.Business.Util.ExtensionMethods
+{
+ public static class DateTimeExtensions
+ {
+ public static DateTime StartOfWeek(this DateTime dt)
+ {
+ DayOfWeek startOfWeek = DayOfWeek.Monday;
+ int diff = dt.DayOfWeek - startOfWeek;
+ if (diff < 0)
+ {
+ diff += 7;
+ }
+
+ return dt.AddDays(-1 * diff).Date;
+ }
+
+ public static DateTime EndOfWeek(this DateTime dt)
+ {
+ DayOfWeek endOfWeek = DayOfWeek.Sunday;
+ int diff = endOfWeek - dt.DayOfWeek;
+ if (diff < 7)
+ {
+ diff += 7;
+ }
+
+ return dt.AddDays(diff).Date;
+ }
+ }
+}
+
+
Modified: source/trunk/CronosControl/CronosControlBusinessClassLibrary/CronosControlBusinessClassLibrary.csproj
===================================================================
--- source/trunk/CronosControl/CronosControlBusinessClassLibrary/CronosControlBusinessClassLibrary.csproj 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlBusinessClassLibrary/CronosControlBusinessClassLibrary.csproj 2010-03-25 21:49:00 UTC (rev 38)
@@ -76,6 +76,7 @@
<Compile Include="Business\Users.cs" />
<Compile Include="Business\Util\ErrorHandling\ExceptionBusinessError.cs" />
<Compile Include="Business\Util\ErrorHandling\IBusinessError.cs" />
+ <Compile Include="Business\Util\ExtensionMethods\DateTimeExtensions.cs" />
<Compile Include="Business\Util\Helpers\EntityHelperUtil.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Added: source/trunk/CronosControl/CronosControlWeb/Content/TasksTracking.css
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Content/TasksTracking.css (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Content/TasksTracking.css 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,7 @@
+
+/* Task Tracking Forms */
+
+.task-date
+{
+ width: 20px;
+}
\ No newline at end of file
Added: source/trunk/CronosControl/CronosControlWeb/Controllers/CompaniesController.cs
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Controllers/CompaniesController.cs (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Controllers/CompaniesController.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using System.Web.Mvc.Ajax;
+using CronosControl.Business;
+using CronosControl.Model;
+
+namespace CronosControlWeb.Controllers
+{
+ public class CompaniesController : Controller
+ {
+ //
+ // GET: /Companies/
+
+ public ActionResult Index()
+ {
+ Companies companies = new Companies();
+ //ViewData.Model = companies.List(new User(), startDate, endDate, 0, 10);
+ ViewData.Model = companies.List();
+
+ return View("List");
+ }
+
+ //
+ // GET: /Companies/Details/5
+
+ public ActionResult Details(int id)
+ {
+ Companies companies = new Companies();
+ //ViewData.Model = companies.List(new User(), startDate, endDate, 0, 10);
+ Company company = new CronosControl.Model.Company() { IdCompany = id };
+ companies.setEntityKey(company);
+ ViewData.Model = companies.Get(company);
+ return View();
+ }
+
+ //
+ // GET: /Companies/Create
+
+ public ActionResult Create()
+ {
+ return View();
+ }
+
+ //
+ // POST: /Companies/Create
+
+ [AcceptVerbs(HttpVerbs.Post)]
+ public ActionResult Create(FormCollection collection)
+ {
+ try
+ {
+ // TODO: Add insert logic here
+
+ return RedirectToAction("Index");
+ }
+ catch
+ {
+ return View();
+ }
+ }
+
+ //
+ // GET: /Companies/Edit/5
+
+ public ActionResult Edit(int id)
+ {
+ Companies companies = new Companies();
+ //ViewData.Model = companies.List(new User(), startDate, endDate, 0, 10);
+ Company company = new CronosControl.Model.Company() { IdCompany = id };
+ companies.setEntityKey(company);
+ ViewData.Model = companies.Get(company);
+ return View();
+ }
+
+ //
+ // POST: /Companies/Edit/5
+
+ [AcceptVerbs(HttpVerbs.Post)]
+ public ActionResult Edit(int id, FormCollection collection)
+ {
+ try
+ {
+ // TODO: Add update logic here
+
+ return RedirectToAction("Index");
+ }
+ catch
+ {
+ return View();
+ }
+ }
+ }
+}
Added: source/trunk/CronosControl/CronosControlWeb/Controllers/TasksController.cs
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Controllers/TasksController.cs (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Controllers/TasksController.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using System.Web.Mvc.Ajax;
+using CronosControl.Business;
+using CronosControl.Business.Util.ExtensionMethods;
+using CronosControl.Model;
+
+namespace CronosControlWeb.Controllers
+{
+ public class TasksController : Controller
+ {
+ //
+ // GET: /Tasks/
+
+ public ActionResult Index()
+ {
+ List<DateTime> dateRange = new List<DateTime>();
+
+ DateTime startDate = DateTime.Now.StartOfWeek();
+ DateTime endDate = DateTime.Now.EndOfWeek();
+
+ for (DateTime date = startDate.Date; date <= endDate.Date; date = date.AddDays(1))
+ {
+ DateTime newDate = new DateTime();
+ newDate = Convert.ToDateTime(date);
+ dateRange.Add(newDate);
+ }
+
+ Tasks tasks = new Tasks();
+ //ViewData.Model = tasks.UserTasks(new User(), startDate, endDate, 0, 10);
+ ViewData.Model = tasks.List();
+
+ ViewData.Add("dateRange", dateRange);
+
+ //TODO: Create a time sheet or get a time sheet(s) for the current time frame
+
+ return View("TasksTracking");
+ }
+
+ //
+ // GET: /Tasks/Details/5
+
+ public ActionResult Details(int id)
+ {
+ return View();
+ }
+
+ //
+ // GET: /Tasks/Create
+
+ public ActionResult Create()
+ {
+ return View();
+ }
+
+ //
+ // POST: /Tasks/Create
+
+ [AcceptVerbs(HttpVerbs.Post)]
+ public ActionResult Create(FormCollection collection)
+ {
+ try
+ {
+ // TODO: Add insert logic here
+
+ return RedirectToAction("Index");
+ }
+ catch
+ {
+ return View();
+ }
+ }
+
+ //
+ // GET: /Tasks/Edit/5
+
+ public ActionResult Edit(int id)
+ {
+ return View();
+ }
+
+ //
+ // POST: /Tasks/Edit/5
+
+ [AcceptVerbs(HttpVerbs.Post)]
+ public ActionResult Edit(int id, FormCollection collection)
+ {
+ try
+ {
+ // TODO: Add update logic here
+
+ return RedirectToAction("Index");
+ }
+ catch
+ {
+ return View();
+ }
+ }
+ }
+}
Modified: source/trunk/CronosControl/CronosControlWeb/Controllers/TimeCategoryController.cs
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Controllers/TimeCategoryController.cs 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlWeb/Controllers/TimeCategoryController.cs 2010-03-25 21:49:00 UTC (rev 38)
@@ -54,10 +54,6 @@
{
TimeCategories categories = new TimeCategories();
Company company = CronosControlContext.Current.CurrentCompany;
- company = new Company();//FIXME: REMOVE THIS GET THE LOGGED USER SESSION
- company.IdCompany = 1;//FIXME: REMOVE THIS GET THE LOGGED USER SESSION
- new Companies().setEntityKey(company);
- company = new Companies().Get(company); //FIXME: REMOVE THIS GET THE LOGGED USER SESSION
TimeCategory timeCategory = new TimeCategory()
{
Modified: source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj 2010-03-25 21:49:00 UTC (rev 38)
@@ -59,8 +59,10 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\AccountController.cs" />
+ <Compile Include="Controllers\CompaniesController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\ProjectsController.cs" />
+ <Compile Include="Controllers\TasksController.cs" />
<Compile Include="Controllers\TimeCategoryController.cs" />
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
@@ -83,6 +85,7 @@
<Content Include="Content\images\logo.png" />
<Content Include="Content\images\top.gif" />
<Content Include="Content\SiteMaster.css" />
+ <Content Include="Content\TasksTracking.css" />
<Content Include="Default.aspx" />
<Content Include="Global.asax" />
<Content Include="Scripts\images\ui-bg_flat_0_aaaaaa_40x100.png" />
@@ -94,7 +97,11 @@
<Content Include="Scripts\images\ui-icons_f9bd01_256x240.png" />
<Content Include="Scripts\jquery-ui-1.7.2.custom.css" />
<Content Include="Scripts\jquery-ui-1.7.2.custom.min.js" />
+ <Content Include="Views\Companies\Details.aspx" />
+ <Content Include="Views\Companies\Edit.aspx" />
+ <Content Include="Views\Companies\List.aspx" />
<Content Include="Views\Projects\ProjectsList.aspx" />
+ <Content Include="Views\Tasks\TasksTracking.aspx" />
<Content Include="Views\TimeCategory\TimeCategoryCreate.aspx" />
<Content Include="Views\TimeCategory\TimeCategoryList.aspx" />
<Content Include="Web.config" />
Added: source/trunk/CronosControl/CronosControlWeb/Views/Companies/Details.aspx
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Companies/Details.aspx (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Companies/Details.aspx 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,48 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CronosControl.Model.Company>" %>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+ Company Details
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+
+ <h2>Company Details</h2>
+
+ <fieldset>
+ <legend><%= Html.Encode(Model.Name) %></legend>
+ <p>
+ Id Company:
+ <%= Html.Encode(Model.IdCompany) %>
+ </p>
+ <p>
+ Name:
+ <%= Html.Encode(Model.Name) %>
+ </p>
+ <p>
+ Description:
+ <%= Html.Encode(Model.Description) %>
+ </p>
+ <p>
+ CreatedAt:
+ <%= Html.Encode(String.Format("{0:g}", Model.CreatedAt)) %>
+ </p>
+ <p>
+ UpdatedAt:
+ <%= Html.Encode(String.Format("{0:g}", Model.UpdatedAt)) %>
+ </p>
+ <p>
+ Enabled:
+ <%= Html.Encode(Model.Enabled) %>
+ </p>
+ </fieldset>
+ <p>
+
+ <%=Html.ActionLink("Edit", "Edit", new { id=Model.IdCompany }) %> |
+ <%=Html.ActionLink("Back to List", "Index") %>
+ </p>
+
+</asp:Content>
+
+<asp:Content ID="Content3" ContentPlaceHolderID="CustomCSS" runat="server">
+</asp:Content>
+
Added: source/trunk/CronosControl/CronosControlWeb/Views/Companies/Edit.aspx
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Companies/Edit.aspx (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Companies/Edit.aspx 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,62 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CronosControl.Model.Company>" %>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+ Edit Companies
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+
+ <h2>Edit</h2>
+
+ <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
+
+ <% using (Html.BeginForm()) {%>
+
+ <fieldset>
+ <legend><%= Html.Encode(Model.Name) %></legend>
+ <p>
+ <label for="IdCompany">Id Company:</label>
+ <%= Html.Hidden("IdCompany", Model.IdCompany) %>
+ <%= Html.Encode(Model.IdCompany) %>
+ </p>
+ <p>
+ <label for="Name">Name:</label>
+ <%= Html.TextBox("Name", Model.Name) %>
+ <%= Html.ValidationMessage("Name", "*") %>
+ </p>
+ <p>
+ <label for="Description">Description:</label>
+ <%= Html.TextBox("Description", Model.Description) %>
+ <%= Html.ValidationMessage("Description", "*") %>
+ </p>
+ <p>
+ <label for="CreatedAt">Created At:</label>
+ <%= Html.TextBox("CreatedAt", String.Format("{0:g}", Model.CreatedAt)) %>
+ <%= Html.ValidationMessage("CreatedAt", "*") %>
+ </p>
+ <p>
+ <label for="UpdatedAt">Updated At:</label>
+ <%= Html.TextBox("UpdatedAt", String.Format("{0:g}", Model.UpdatedAt)) %>
+ <%= Html.ValidationMessage("UpdatedAt", "*") %>
+ </p>
+ <p>
+ <label for="Enabled">Enabled:</label>
+ <%= Html.TextBox("Enabled", Model.Enabled) %>
+ <%= Html.ValidationMessage("Enabled", "*") %>
+ </p>
+ <p>
+ <input type="submit" value="Save" />
+ </p>
+ </fieldset>
+
+ <% } %>
+
+ <div>
+ <%=Html.ActionLink("Back to List", "Index") %>
+ </div>
+
+</asp:Content>
+
+<asp:Content ID="Content3" ContentPlaceHolderID="CustomCSS" runat="server">
+</asp:Content>
+
Added: source/trunk/CronosControl/CronosControlWeb/Views/Companies/List.aspx
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Companies/List.aspx (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Companies/List.aspx 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,73 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CronosControl.Model.Company>>" %>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+ Companies List
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+
+ <h2>Companies List</h2>
+
+ <table>
+ <tr>
+ <th></th>
+ <th>
+ Id Company
+ </th>
+ <th>
+ Name
+ </th>
+ <th>
+ Description
+ </th>
+ <th>
+ Created At
+ </th>
+ <th>
+ Updated At
+ </th>
+ <th>
+ Enabled
+ </th>
+ </tr>
+
+ <% foreach (var item in Model) { %>
+
+ <tr>
+ <td>
+ <%= Html.ActionLink("Edit", "Edit", new { id=item.IdCompany }) %> |
+ <%= Html.ActionLink("Details", "Details", new { id=item.IdCompany })%>
+ </td>
+ <td>
+ <%= Html.Encode(item.IdCompany) %>
+ </td>
+ <td>
+ <%= Html.Encode(item.Name) %>
+ </td>
+ <td>
+ <%= Html.Encode(item.Description) %>
+ </td>
+ <td>
+ <%= Html.Encode(String.Format("{0:g}", item.CreatedAt)) %>
+ </td>
+ <td>
+ <%= Html.Encode(String.Format("{0:g}", item.UpdatedAt)) %>
+ </td>
+ <td>
+ <%= Html.Encode(item.Enabled) %>
+ </td>
+ </tr>
+
+ <% } %>
+
+ </table>
+
+ <p>
+ <%= Html.ActionLink("Create New", "Create") %>
+ </p>
+
+</asp:Content>
+
+<asp:Content ID="Content3" ContentPlaceHolderID="CustomCSS" runat="server">
+</asp:Content>
+
Modified: source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master 2010-03-25 21:49:00 UTC (rev 38)
@@ -9,6 +9,9 @@
<link href="/Content/Site.css" rel="stylesheet" type="text/css" />
<link href="/Content/SiteMaster.css" rel="stylesheet" type="text/css" />
<link href="/Scripts/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
+ <!-- page custom css -->
+ <asp:ContentPlaceHolder ID="CustomCSS" runat="server" />
+ <!-- end page custom css -->
<script src="/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
</head>
Added: source/trunk/CronosControl/CronosControlWeb/Views/Tasks/TasksTracking.aspx
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Tasks/TasksTracking.aspx (rev 0)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Tasks/TasksTracking.aspx 2010-03-25 21:49:00 UTC (rev 38)
@@ -0,0 +1,89 @@
+<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CronosControl.Model.Task>>" %>
+
+<asp:Content ID="Content3" ContentPlaceHolderID="CustomCSS" runat="server">
+ <link href="/Content/TasksTracking.css" rel="stylesheet" type="text/css" />
+</asp:Content>
+
+<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
+ Tracking
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
+
+ <h2>Tracking</h2>
+ <table>
+ <thead>
+ <tr>
+ <th>
+ Code
+ </th>
+ <th>
+ Name
+ </th>
+ <th>
+ Project
+ </th>
+ <th>
+ Description
+ </th>
+ <th>
+ Start Date
+ </th>
+ <th>
+ End Date
+ </th>
+ <% foreach (var item in (List<DateTime>)ViewData["dateRange"])
+ { %>
+ <th>
+ <%= item.ToShortDateString() %>
+ </th>
+ <% } %>
+ <th>
+ Save Tracking
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <% foreach (var task in Model) { %>
+ <tr>
+ <td>
+ JobCode
+ </td>
+ <td>
+ <%= task.Name %>
+ </td>
+ <td>
+ TD
+ </td>
+ <td>
+ <%= task.Description %>
+ </td>
+ <td>
+ <%= task.StartDate.ToShortDateString()%>
+ </td>
+ <td>
+ <%= task.EndDate.ToShortDateString()%>
+ </td>
+ <% foreach (var item in (List<DateTime>)ViewData["dateRange"])
+ { %>
+ <td>
+ <input class="task-date" id="<%= item.ToShortDateString() %>" type="text" />
+ </td>
+ <% } %>
+ <td>
+ <%= Html.ActionLink("Save", "Save", new { /*id=item.PrimaryKey */ }) %>
+ </td>
+ <td>
+ TOTAL
+ </td>
+ </tr>
+ <% } %>
+ </tbody>
+ </table>
+
+ <p>
+ <%= Html.ActionLink("Create New", "Create") %>
+ </p>
+
+</asp:Content>
+
Modified: source/trunk/CronosControl/CronosControlWeb/Views/TimeCategory/TimeCategoryList.aspx
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/TimeCategory/TimeCategoryList.aspx 2010-03-16 17:28:50 UTC (rev 37)
+++ source/trunk/CronosControl/CronosControlWeb/Views/TimeCategory/TimeCategoryList.aspx 2010-03-25 21:49:00 UTC (rev 38)
@@ -1,5 +1,9 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<CronosControl.Model.TimeCategory>>" %>
+<asp:Content ID="customCSSContent" ContentPlaceHolderID="customCSS" runat="server">
+ <link href="/Content/TaskTracking.css" rel="stylesheet" type="text/css" />
+</asp:Content>
+
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
TimeCategoryList
</asp:Content>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|