Revision History:
Date
Author
Change Summary
Version
9/28/2012
Veenay Pokhriyal
Initial draft
1.0
10/3/2012
Veenay Pokhriyal
1.1
References:
Key
BRS
Mock Up
HLD
HDL v1.2
Contents
1 User Control .................................................................................................................................................................... 3
1.1
Project View ...................................................................................................................................................3
1.2
1.2.1
Constructor ..................................................................................................................................................... 3
1.2.2
OnViewInitialized ............................................................................................................................................ 3
1.2.3
LoadDataSourceOnView ................................................................................................................................. 4
1.3
User Control Design ........................................................................................................................................4
1.4
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
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.2 Constructor
Constructor signature:
public ProjectPresenter()
Constructor Details:
1.2.3 OnViewInitialized
Method Signature:
public void OnViewInitialized ()
Method Details:
Call helper method LoadDataSourceOnView.
Veenay Pokhriyal: Friday, September 27, 2013
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 ()
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
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
Stored Files: Files which are added to main location and main table
Tem Files:
Namespace: Guru.Websites.Marketplace.UserControls.Projects
Method Details:
Call Presenter OnViewInitialized method only in case page is not post back.
2.2.2 Constructor
Constructor signature:
public PostProjectPresenter()
Constructor Details:
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.
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.1 OnInit
Method Signature:
protected override void OnInit(EventArgs e)
Method Details:
Add event handler for Post Project Button.
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
Method Details:
If user is not logged in.
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 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.
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}]
Method Details:
Invoke utility method to retrieve matching countries.
Call utility method to convert the string in Auto Fill Json format.
Method Details:
Invoke utility method to retrieve matching cities.
Call utility method to convert the string in Auto Fill Json format.
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}]
}
}
10
[WebMethod()]
Public static void DeletTemAttachment(int GroupID, string FileIDs)
Method Details:
Invoke utility method to delete temp attachmented file based on GroupID and FileID.
11