Anda di halaman 1dari 11

Post Project

Low Level Document

Revision History:
Date

Author

Change Summary

Version

9/28/2012

Veenay Pokhriyal

Initial draft

1.0

10/3/2012

Veenay Pokhriyal

User Control & Page: View, Present & Code behind


Auto Fill Control
Attachment

1.1

References:
Key

Document Location & Name

BRS

Post Project v1.4.docx

Mock Up

Post Project, Modify Project and Repost Project

HLD

HDL v1.2

Contents
1 User Control .................................................................................................................................................................... 3
1.1
Project View ...................................................................................................................................................3
1.2

Project Presenter ............................................................................................................................................3

1.2.1
Constructor ..................................................................................................................................................... 3
1.2.2
OnViewInitialized ............................................................................................................................................ 3
1.2.3
LoadDataSourceOnView ................................................................................................................................. 4
1.3
User Control Design ........................................................................................................................................4
1.4

User Control Code Behind ...............................................................................................................................5


1.4.1

Page Load ........................................................................................................................................................ 6

2 Post Project Page ............................................................................................................................................................ 6


2.1
Post Project View ............................................................................................................................................6
2.2

Post Project Presenter.....................................................................................................................................7


2.2.1
2.2.2

Member Variables ........................................................................................................................................... 7


Constructor ..................................................................................................................................................... 7

HLD: Post Project

2.2.3
OnViewInitialized ............................................................................................................................................ 7
2.2.4
ShowProjectInfoOnView ................................................................................................................................. 7
2.2.5
OnSaveProject ................................................................................................................................................. 8
2.2.6
SaveProjectOnView ......................................................................................................................................... 8
2.3
Post Page Code Behind....................................................................................................................................8
2.3.1
OnInit .............................................................................................................................................................. 8
2.3.2
Page Load ........................................................................................................................................................ 8
2.3.3
Save Project..................................................................................................................................................... 9
2.3.4
Get Matching Skills.......................................................................................................................................... 9
2.3.5
Get Matching Countries ................................................................................................................................ 10
2.3.6
Get Matching Cities ....................................................................................................................................... 10
2.3.7
Get Temp Attachments ................................................................................................................................. 10
2.3.8
Delete Temp Attachment.............................................................................................................................. 10
2.4
Page - Post Project ........................................................................................................................................ 11

Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

1 User Control
1.1 Project View
File Name: IPostProjectView.cs
Namespace: Guru.SharedUserControls.Views
//Methods
void LoadIndustry()
void LoadBudget()
void LoadProjectDuration()
void LoadHourPerWeek()

1.2 Project Presenter


File Name: IProjectPresenter.cs
Namespace: Guru.SharedUserControls.Views

1.2.1 Member Variables


private readonly BusinessFacade businessFacade;
private PostProject service;

1.2.2 Constructor
Constructor signature:
public ProjectPresenter()
Constructor Details:

Initializes businessFacade variable.

1.2.3 OnViewInitialized
Method Signature:
public void OnViewInitialized ()

Method Details:
Call helper method LoadDataSourceOnView.
Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

1.2.4 LoadDataSourceOnView
Method Signature:
private void LoadDataSourceOnView ()

Method Details:
Using businessFacade initialize service vaidable.
service invoke BL method to retrieve Industry, Budget, Project Duration and Hour per Week Data.
Initialized user control data source of Industry, Budget, Project Duration and Hour per Week dropdown.
view.LoadIndustry()
view.LoadBudget ()
view.LoadProjectDuration
view.LoadHourPerWeek ()

1.3 User Control Design


File Name: Project.ascx
Field: Skills
Control: GuruAutoFill
Property

Value

DataSource

GetSkills

AllowAdd

True

MinChar

MaxSelect

50

Selected values are stored internally in the hidden filed in key value pair. In case of newly added skills key will be 0 so
while saving project information. Newly added skills could be added in tSkillList table. Exposed as list of int and string

Field: Country
Control: GuruAutoFill
Property

Value

DataSource

GetCountries

AllowAdd

False

MinChar

MaxSelect

Selected values are stored internally in the hidden filed in key value pair. Exposed as list of int.
Field: City
Control: GuruAutoFill
Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

Property

Value

DataSource

GetCities

AllowAdd

True

MinChar

MaxSelect

Selected values are stored internally in the hidden filed in key value pair. Exposed as list of int.

Field: City
Control: Repeter

Display sprit image based on file type.


Delete icon

Stored Files: Files which are added to main location and main table

Files will be loaded as repeater item.


On delete files ID will be stored in hidden field.

Tem Files:

Will be loaded in place holder, next to repeater control.


On delete, service will be invoked which will remove file from tem location and as well from temp folder.
DeleteTemAttachment(int GroupID, int FileID)
On add files to project, uplodify will raise Attched java script event with Group ID & File IDs and page will
subscribe.
JS function:
function LoadTemFiles(group, files)
{
handler will invoke service method. GetTemAttachments(int GroupID, string FileIDs) and will return data
in JSon format.
Find place holder control and append the extracted inform to the control.
}
JSon Format:
{
Attachment: {
Group ID:XXX,
Files : [{ID:xxx,FileLocation:XXX,FileType:XXX},
{ID:xxx,FileLocation:XXX ,FileType:XXX},
{ID:xxx,FileLocation:XXX ,FileType:XXX}]
}
}

1.4 User Control Code Behind


File Name: Project.ascx.cs
Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

Namespace: Guru.Websites.Marketplace.UserControls.Projects

1.4.1 Page Init


Method Signature:
protected override void OnInit(EventArgs e)

Method Details:
Call Presenter OnViewInitialized method only in case page is not post back.

2 Post Project Page


2.1 Post Project View
File Name: IPostProjectView.cs
Namespace: Guru.Employer.Views
//Properties
UserType UserType { get; set; }
ProjectActionType ActionType { get; set; }
int ProjectID { get; set; }
String ProjectTitle { get; set; }
String ProjectDescription { get; set; }
Enum PrivacySetting { get; set; }
bool IsSearchIndex { get; set; }
Enum LocatioType { get; set; }
int PreferedLocation { get; set; }
int Miles { get; set; }
int ZipCode { get; set; }
int Industry { get; set; }
int GroupID { get; set; }
IList<int, string> Skills { get; set; }
Enum BudgetType { get; set; }
int ProjectCost { get; set; }
int ProjectDuration { get; set; }
int HourPerWeek { get; set; }
float MinRate { get; set; }
float MaxRate { get; set; }
string[] FileLocation { get; set; }
DateTime CloseDate { get; set; }
bool CloseExistingProject { get; set; }

Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

2.2 Post Project Presenter


File Name: PostProjectPresenter.cs
Namespace: Guru.Employer.Views

2.2.1 Member Variables


private readonly BusinessFacade businessFacade;
private PostProject service;

2.2.2 Constructor
Constructor signature:
public PostProjectPresenter()
Constructor Details:

Initializes businessFacade variable.

2.2.3 OnViewInitialized
Method Signature:
public void OnViewInitialized ()

Method Details:
If Action Type is Modify or Repost then call helper method ShowProjectInfoOnView.

2.2.4 ShowProjectInfoOnView
Method Signature:
public void ShowProjectInforOnView ()

Method Details:
Using businessFacade initializes service variable.
Invoke business method to retrieve project information based on Project ID.
Manipulate project information using view.

Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

2.2.5 OnSaveProject
Method Signature:
public void OnSaveProject ()

Method Details:
Call helper method SaveProjectOnView.

2.2.6 SaveProjectOnView
Method Signature:
public void SaveProjectOnView ()

Method Details:
Using businessFacade initializes service variable.
Invoke business method to save the information.

2.3 Post Page Code Behind


File Name: PostProject.aspx.cs
Namespace: Guru.Websites.Marketplace.Employer

2.3.1 OnInit
Method Signature:
protected override void OnInit(EventArgs e)

Method Details:
Add event handler for Post Project Button.

2.3.2 Page Load


Method Signature:
protected void Page_Load(object sender, EventArgs e)

Method Details:
Process Query string.
If User is not logged in as employer load Registration and Sign in user control.
Action Type: Modify or Repost
Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

If page is not post back.


Call Presenter OnViewInitialized method only in case page is not post back and Action Type is.

2.3.3 Save Project


Method Signature:
protected void btnSaveProject_Click(object sender, EventArgs e)

Method Details:
If user is not logged in.

If opted for Register: RegistrationUtility.RegisterUser(FullName, EmailAddress, Username, Password,


false, userType.Emp, true);

If Fail, Guru Account Exception will be raised by BL and page will divert such type of exception to
Login user control. Further processing will be aborted.

If opted for Signin: LoginUtility.LoginUser<CompanyRegisteredUser>(username, password);

If Fail, Guru Login Exception will be raised by BL and page will divert to Login user control. Further
processing will be aborted.

If Succeed, proceed further to save project information. Otherwise terminate the process and display error
message to user.
Call Presenter OnSaveProject method to save the project information. Present will retrieve information
using view from user control.
Exception will be handled in the page, in case of Post Project Exception or application exception.
Note: In all type of exception, error message will be displayed on the page.

2.3.4 Get Matching Skills


Method Signature:
[WebMethod()]
[ScriptMethod(ResponseFormat = ResponseFormat.JSon)]
Public static String[] GetSkills(String keyWord)

Method Details:
Invoke utility method to retrieve matching skills.
Call utility method to convert the string in Auto Fill Json format.
EG: AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(Value, Key)

JSon Format:
[{id:XXX, name:XXX},
{id:XXX, name:XXX},
{id:XXX, name:XXX}]

Veenay Pokhriyal: Friday, September 27, 2013

HLD: Post Project

2.3.5 Get Matching Countries


Method Signature:
[WebMethod()]
[ScriptMethod(ResponseFormat = ResponseFormat.JSon)]
Public static String[] GetCountries(String keyWord)

Method Details:
Invoke utility method to retrieve matching countries.
Call utility method to convert the string in Auto Fill Json format.

2.3.6 Get Matching Cities


Method Signature:
[WebMethod()]
[ScriptMethod(ResponseFormat = ResponseFormat.JSon)]
Public static String[] GetCities(String keyWord)

Method Details:
Invoke utility method to retrieve matching cities.
Call utility method to convert the string in Auto Fill Json format.

2.3.7 Get Temp Attachments


Method Signature:
[WebMethod()]
[ScriptMethod(ResponseFormat = ResponseFormat.JSon)]
Public static String[] GetCities(int GroupID, string FileIDs)

Method Details:
Invoke utility method to retrieve list of temp attachmented files based on GroupID and FileID.
Convert the string in Json format.
JSon Format:
{
Attachment: {
Group ID:XXX,
Files : [{ID:xxx,FileLocation:XXX},
{ID:xxx,FileLocation:XXX},
{ID:xxx,FileLocation:XXX}]
}
}

2.3.8 Delete Temp Attachment


Method Signature:
Veenay Pokhriyal: Friday, September 27, 2013

10

HLD: Post Project

[WebMethod()]
Public static void DeletTemAttachment(int GroupID, string FileIDs)

Method Details:
Invoke utility method to delete temp attachmented file based on GroupID and FileID.

2.4 Page - Post Project


File Name: PostProject.aspx
Page will implement 3 user controls.
Post Project: Page will initialize and retrieve values from the user control.
Registration: load only when user is not authenticated.
Sign in: load only when user is not authenticated.

Veenay Pokhriyal: Friday, September 27, 2013

11

Anda mungkin juga menyukai