protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CalDate.Visible = false; if (!string.IsNullOrEmpty(Request.QueryString["ID"])) { } else if (!string.IsNullOrEmpty(Request.QueryString["PROJECTID"])) { PROJECTID = Guid.Parse(Request.QueryString["PROJECTID"]); ENTPRJPROJECT prj = DALProject.GetProject(PROJECTID); if (prj != null) { lblProjectName.Text = prj.NAME; } else { Response.Redirect("/Prj/PRJProjectDetail.aspx?ID=" + PROJECTID); } } else { Response.Redirect("/Prj/PRJProjectDetail.aspx?ID=" + PROJECTID); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Guid.Parse(ONLINEUSER.ID.ToString()); DrpFirmFill(); DrpStatusFill(); if (!string.IsNullOrEmpty(Request.QueryString["ID"])) { } else if (!string.IsNullOrEmpty(Request.QueryString["PROJECTID"])) { PROJECTID = Guid.Parse(Request.QueryString["PROJECTID"]); ENTPRJPROJECT prjupdate = DALProject.GetProject(PROJECTID); if (prjupdate != null) { txtProjectName.Text = prjupdate.NAME; txtDescription.Text = prjupdate.DESCRIPTION; drpFirm.SelectedValue = prjupdate.FIRMID.ToString(); drpStatus.SelectedValue = prjupdate.TYPEPROJECTSTATUSID.ToString(); } else { Response.Redirect("/Prj/PRJProjectDetail.aspx?ID=" + PROJECTID); } } else { Response.Redirect("/Prj/PRJProjectDetail.aspx?ID=" + PROJECTID); } } }
private void FillProjectTasks() { ENTPRJPROJECT prj = DALProject.GetProject(Guid.Parse(Request.QueryString["ID"])); if (prj != null) { PROJECTID = prj.ID; rptProjectsDetail.DataSource = DALProjectTask.GetAllListProjectsTasks(PROJECTID); rptProjectsDetail.DataBind(); } else { Response.Redirect("/Prj/PRJProjects.aspx"); } }
protected void btnUpdate_Click(object sender, EventArgs e) { if (ValidateRecord()) { ENTPRJPROJECT prj = DALProject.GetProject(Guid.Parse(Request.QueryString["PROJECTID"])); if (prj != null) { prj.NAME = txtProjectName.Text; prj.DESCRIPTION = txtDescription.Text; prj.FIRMID = Guid.Parse(drpFirm.SelectedValue); prj.TYPEPROJECTSTATUSID = Convert.ToByte(drpStatus.SelectedValue); DALProject.Update(prj); Response.Redirect("/Prj/PRJProjectDetail.aspx?ID=" + PROJECTID); } } }