- task_management.zip
- Task_Management
- 3LayerArchitecture11.JPG
- Database
- TaskManagementSystemDB.mdf
- TaskManagementSystemDB_log.ldf
- TaskManagementSystem
- App_Code
- BLL
- DataLayerClass
- DAO
- Gateway
- App_Data
- App_Themes
- Theme
- Bin
- AjaxControlToolkit.dll
- AjaxControlToolkit.dll.refresh
- AjaxControlToolkit.pdb
- Javascript
- Master
- TaskManagementSystem (4).sln
- TaskManagementSystem (4).suo
- TaskManagementSystem.suo
- UI
- Web.config
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class UI_CreateProject : System.Web.UI.Page
{
DataExecuteClass DEC = null;
protected void Page_Load(object sender, EventArgs e)
{
string userId = Session["userId"].ToString();
string userRole = Session["userRole"].ToString();
this.Master.userId = userId;
this.Master.UserRole = userRole;
this.GenerateProjectId();
}
private void GenerateProjectId()
{
DEC = new DataExecuteClass();
string countProject = "SELECT COUNT(*) FROM t_Project";
object o = DEC.getSingleValue(countProject);
int counter = int.Parse(o.ToString())+1;
string n=null;
if (counter < 10)
{
n = "00" + counter.ToString();
}
if (counter < 100 && counter > 9)
{
n = "0"+ counter.ToString();
}
if (counter > 99 && counter < 1000)
{
n = counter.ToString();
}
string projectId = "PRO-" + DateTime.Now.Year+"-"+n;
projectIdTextBox.Text = projectId;
}
protected void createProjectButton_Click(object sender, EventArgs e)
{
ProjectBLL project = new ProjectBLL();
//string projectAdmin = Request.QueryString["userId"].ToString();
string projectAdmin = "fahmina90";
Project projectObj = new Project(projectIdTextBox.Text, projectNameTextBox.Text, projectDescriptionTextBox.Text, projectClientTextBox.Text, creationDateTextBox.Text, endDateTextBox.Text, projectAdmin);
string UserRole = "Admin";
ProjectDetails ProjectDetailsObj = new ProjectDetails(projectIdTextBox.Text, projectAdmin, UserRole, creationDateTextBox.Text, endDateTextBox.Text);
project.AddUserToProject(ProjectDetailsObj);
int countUser = CheckBoxList1.Items.Count;
for (int i = 0; i < countUser; i++)
{
if (CheckBoxList1.Items[i].Selected)
{
string userId = CheckBoxList1.Items[i].ToString();
string userRole="User";
ProjectDetails projectDetailsObj = new ProjectDetails(projectIdTextBox.Text, userId, userRole, creationDateTextBox.Text, endDateTextBox.Text);
project.AddUserToProject(projectDetailsObj);
}
}
string msg = project.AddNewProject(projectObj);
Response.Redirect("CreateProject.aspx");
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.