CREATE TABLE [dbo].[InvLocation](
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(max) ,
[Description] varchar(max) ,
CONSTRAINT [PK_InvLocation] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
-- InvItems
CREATE TABLE [dbo].[InvItems](
[id] [int] IDENTITY(1,1) NOT NULL,
[Number] varchar(max) ,
[Name] varchar(max) ,
[Description] varchar(max) ,
CONSTRAINT [PK_InvItems] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
-- Inventory
CREATE TABLE [dbo].[Inventory](
[id] [int] IDENTITY(1,1) NOT NULL,
[ItemId] bigint ,
[LocationId] bigint ,
[Quantity] int ,
[CreatedDate] datetime ,
[ParentId] bigint ,
[Description] varchar(max) ,
CONSTRAINT [PK_Inventory] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Thursday, November 15, 2012
dotnetnuke inventory system database script
Thursday, November 1, 2012
dotnetnuke inventory system database scheme
Dotnuke inventory module installs following tables.
Location
InvLocation table , contains information about locations# | Field name | Field type | Description |
1 | id | bigint | Primary key |
2 | Name | varchar(max) | - Location name |
3 | Description | varchar(max) | - contains more detailed information about Location |
Items
InvItems table - contains information about types of products# | Field name | Field type | Description |
1 | id | bigint | Primary key |
2 | Number | varchar(max) | - contains item number |
3 | Name | varchar(max) | - item name |
4 | Description | varchar(max) | - contains more detailed information about Location |
Inventory
Inventory table - contains records about product amount for specific locations# | Field name | Field type | Description |
1 | InvId | bigint | Primary key |
2 | ItemId | bigint | Item |
3 | LocationId | bigint | Location |
4 | Quantity | int | amount |
5 | CreatedDate | datetime | - record created date |
6 | ParentId | bigint | link to parent item |
7 | Description | varchar(max) | - contains more detailed information about this particular items |
Friday, October 26, 2012
timesheet dotnetnuke module
timesheet dotnetnuke module
TsProject table - this table will contain information about current projects including
TsTasks - table will contain information about current tasks.
TsUserAssignments - have information about current users assignments
Database structure of timesheet module:
Module installs following tablesProjects
Project may have infinite amount of tasks.TsProject table - this table will contain information about current projects including
Field name | Field type | Description | |
1 | id | bigint | Primary key |
2 | Name | varchar(max) | name of the project |
3 | Description | varchar(max) | - contains more detailed information about project |
4 | From | datetime | date when reporting to this project will be allowed |
5 | To | datetime | date when reporting to this project will be closed |
6 | Enabled | bool | - indicate if project is active and enabled for reporting |
7 | ProjectOwnerUser | bigint | User responsible for this project , user created project will be assigned by default |
8 | CreatedAt | datetime | date when this project was created |
Tasks
Task can be organised into hierarchical structure - every task can have parent task or have infinite amount of sub-tasks.TsTasks - table will contain information about current tasks.
Field name | Field type | Description | |
1 | id | bigint | Primary key |
2 | ProjectId | bigint | - id of the project of the task record belongs to |
3 | ParentTaskId | bigint | - id of the parent task |
4 | Name | varchar(max) | - contains name of the Task |
5 | Description | varchar(max) | - contains more detailed information about task |
6 | From | datetime | - date when reporting to this task will be allowed |
7 | To | datetime | - date when reporting to this Task will be closed |
8 | Enabled | bool | - indicate if Task is enabled for reporting |
9 | CreatedAt | dtetime | date when task created |
10 | OwnerUser | bigint | User responsible for this task, user created task will be assigned by default |
Assignments
Assignments must be created in order to indicate assignment of particular user to specific task/projectTsUserAssignments - have information about current users assignments
1 | id | bigint | Primary key |
2 | UserId | bigint | |
3 | ProjectID | bigint | - project that is assigned to user |
4 | TaskID | bigint | - task from project - can be omitted if all tasks from them project are available for current user |
5 | From | datetime | - date when user started working on particular task/project.Can be omitted and it will be not enforced. |
6 | To | datetime | - date when user completed reporting to this Task will be closed.Can be omitted and it will be not enforced. |
7 | Enabled | bool | - indicate if assignment is enabled for reporting |
8 | CreatedAt | datetime | date when assignment created |
9 | OwnerUser | bigint | User created this assignment |
User's Report
TsUserReport - hold information about reported hours1 | id | bigint | Primary key |
2 | userId | bigint | - id of DNN user |
3 | taskId | bigint | - id of the task user was working on |
4 | ProjectID | bigint | - id of the project |
4 | Date | datetime | - reported date |
3 | hours | decimal(8,2) | - amount of hours reported for particular task |
4 | typeOfTheHoursId | int | - contains information about type of reported hours : regular hours , overtime hours , sick time |
8 | CreatedAt | datetime | date when task created |
9 | Comment | varchar(max) | - contains more detailed information about report |
Hours Type
tsHoursType - contains information about type of reported hours : regular hours , overtime hours , sick time1 | id | bigint | Primary key |
2 | HourTypeName | varchar(max) | type of hours , regular, overtime, sick time. |
Tuesday, April 24, 2012
dotnetnuke charts
Step 1. Download and install MSChart.exe from :
http://www.microsoft.com/download/en/details.aspx?id=14422
Step2.Add following lines to web.config
<handlers>
...
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<assemblies>
....
<add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<controls>
....
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<httpHandlers>
...
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
Dotnetnuke Module Creator best tool for generation dotnetnuke module.
Monday, April 16, 2012
dotnetnuke ajax example
1.Here we have two related drop down and when on selected , secod one will be repopulated with related values , here is javascript part of the code placed directly into ascx control.
2.Create jsonhub page for making ajax calls from different pages
3.Ad ajax calls inside of control:
<script type="text/javascript"> function PageMethod(fn, paramArray, successFn, errorFn) { //Create list of parameters in the form: //{"paramName1":"paramValue1","paramName2":"paramValue2"} var paramList = ''; if (paramArray.length > 0) { for (var i = 0; i < paramArray.length; i += 2) { if (paramList.length > 0) paramList += ','; paramList += '"' + paramArray[i] + '":"' + paramArray[i + 1] + '"'; } } paramList = '{' + paramList + '}'; //Call the page method $.ajax({ type: "POST", url: fn, contentType: "application/json; charset=utf-8", data: paramList, dataType: "json", success: successFn, error: errorFn }) ; } var TargetDD=''; function Repopulate(value, TargetDDId, url2call) { TargetDD = TargetDDId; PageMethod(url2call, ["Group", "" + value], AjaxSucceeded, AjaxFailed); //No parameters } function AjaxSucceeded(result) { //alert(result.d[0].FirstName); var elem = document.getElementById(TargetDD); $(elem).empty(); $.each(result.d, function (index, v1) { $(elem).append( $('<option></option>').val(v1.MembershipNumber).html(v1.FirstName + " " + v1.LastName) ); }); } function AjaxFailed(result) { alert("ajax failed" + result.d); } </script>
2.Create jsonhub page for making ajax calls from different pages
Imports DotNetNuke.Modules.MembershipModule Imports System.Web.Services Namespace NEvoWeb.Modules.NB_Store Public Class jsonhub Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub <WebMethod()> Public Shared Function MSearchVolunteersbyGroup(Group As Integer) As ArrayList Dim c As New MembershipModuleController Return c.MSearchVolunteersbyGroup(Group) End Function End Class End Namespace
3.Ad ajax calls inside of control:
Dim jscall As String = String.Format("Repopulate(this.value,'{0}','{1}');", ddlSalesRep.ClientID, Me.TemplateSourceDirectory + "/jsonhub.aspx/MSearchVolunteersbyGroup") ddlTeam.Attributes.Add("onchange", jscall)
Friday, March 16, 2012
dnn compile module
here is example of .bat file which compile dnn module from command-line:
call "c:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 msbuild MyModule.sln pause
Thursday, March 15, 2012
PopupCalendar.js
to add datapicker to text field like desribed in this post
it's required to add reference to PopupCalendar.js
it's required to add reference to PopupCalendar.js
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterClientScriptInclude("PopupCalendar",
ResolveUrl(
"~/js/PopupCalendar.js"));
}
Dotnetnuke Module Creator best tool for generation dotnetnuke module.
Sunday, January 8, 2012
dotnetnuke.ui.skins.skin.addmodulemessage
AddModuleMessage not working inside ajax panel,
so in order to make it work do following:
1.Add placeholder on control
<asp:PlaceHolder runat="server" id="MessagePlaceHolder" EnableViewState="false"></asp:PlaceHolder>
2.Add function to code behind:
public virtual void ShowMessage(PlaceHolder ctrl, string m, bool error = true)
{
ModuleMessage.ModuleMessageType moduleMessageType = ModuleMessage.ModuleMessageType.RedError;
if (!error)
{
moduleMessageType = ModuleMessage.ModuleMessageType.BlueInfo;
}
string msg = Localization.GetString(m, LocalResourceFile);
DotNetNuke.UI.Skins.Skin.AddModuleMessage(ctrl, msg, moduleMessageType);
}
Dotnetnuke Module Creator best tool for generation dotnetnuke module.
Subscribe to:
Posts (Atom)