protected void btnSubmit_Click(object sender, EventArgs e) { projectBrief = new ProjectBrief(); #region Save Project Component try { if (projectBrief.AddProjectComponent(drpLoanNumber.SelectedItem.Value, txtProjectComponent.Text.Trim().Replace("'", ""), drpLineMinister.SelectedItem.Value, drpAdbTaskManager.SelectedItem.Value, drpNodalOfficer.SelectedItem.Value, drpPorjectDirector.SelectedItem.Value)) { btnUpdate.Visible = true; btnSubmit.Visible = false; lblMessage.Text = "Information successfully saved"; objUtil = new Utility(); objUtil.ResetFormControl(reSetDiv); } else { lblMessage.Text = "There is some error, Please try after some time"; btnUpdate.Visible = false; btnSubmit.Visible = true; } } catch (SqlException ex) { logger.Error(ex); } #endregion }
public void ProjectBrief_CanBeCreated() { //Given ProjectBrief projectBrief; //When projectBrief = new ProjectBrief(); //Then Assert.NotNull(projectBrief); }
public AppointedExecutivesAndProjectManager AppointExecutivesAndProjectManager(ProjectMandate projectMandate) { projectBrief = new ProjectBrief() { roleDescriptions = new RoleDescriptions() { ExecutiveRoleDescription = projectMandate.Executive, ProjectManagerRoleDescription = projectMandate.ProjectManager } }; return(new AppointedExecutivesAndProjectManager() { Executive = projectMandate.Executive, ProjectManager = projectMandate.ProjectManager }); }
protected void grdProjectComponentDetails_RowDeleting(object sender, GridViewDeleteEventArgs e) { projectBrief = new ProjectBrief(); try { int rowIndex = int.Parse(grdProjectComponentDetails.DataKeys[e.RowIndex].Value.ToString()); if (projectBrief.DeleteProjectComponentDetails(rowIndex)) { UrlParameterPasser urlWrapper = new UrlParameterPasser("ProjectComponentDetailsList.aspx"); urlWrapper.PassParameters(); } } catch (Exception ex) { logger.Error(ex); } }
protected void Page_Load(object sender, EventArgs e) { try { string pbsval = Request.QueryString["pbsval"]; string loanid = Request.QueryString["loan"]; string quarterid = Request.QueryString["quarterid"]; string yearid = Request.QueryString["yearid"]; projectBrief = new ProjectBrief(); if (pbsval == "") { ds = projectBrief.GetProjectBriefDetails(Convert.ToInt32(loanid), Convert.ToInt32(quarterid), Convert.ToInt32(yearid)); } else { ds = projectBrief.GetProjectBriefDetailsMonthly(Convert.ToInt32(loanid), Convert.ToInt32(quarterid), Convert.ToInt32(yearid)); } dt = ds.Tables[0]; if (dt.Rows.Count > 0 && dt.Rows[0]["vsFile"].ToString() != "") { string fileName = dt.Rows[0]["vsFile"].ToString(); string contentType = dt.Rows[0]["vsContentType"].ToString(); Byte[] programfile = (Byte[])(dt.Rows[0]["vbProgramFile"]); Response.Clear(); Response.ClearHeaders(); Response.ClearContent(); Response.ContentType = contentType; Response.AddHeader("content-disposition", "inline; filename=" + fileName); Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.BinaryWrite((byte[])programfile); Response.End(); Response.Flush(); } } catch (Exception ex) { throw ex; } }
private void DisplayingDataForOperation() { #region displaying data and mange screen for insert objCommon = new CommonFunction(); projectBrief = new ProjectBrief(); dt = new DataTable(); ds = new DataSet(); ds = projectBrief.GetProjectComponentDetails(Convert.ToInt32(drpLoanNumber.SelectedValue)); dt = ds.Tables[0]; if (dt.Rows.Count != 0) { //btnSubmit.Text = "Update"; btnUpdate.Visible = true; btnSubmit.Visible = false; txtProjectComponent.Text = dt.Rows[0]["vsProjectComponent"].ToString(); //now this is not using those filed which is visble false of that row drpAdbTaskManager.SelectedValue = dt.Rows[0]["vsADBtaskManagerId"].ToString(); drpLineMinister.SelectedValue = dt.Rows[0]["vsLineMinisterId"].ToString(); drpNodalOfficer.SelectedValue = dt.Rows[0]["vsNodalOfficerId"].ToString(); drpPorjectDirector.SelectedValue = dt.Rows[0]["vsProjectDirectorId"].ToString(); } else { // btnSubmit.Text = "Save"; btnUpdate.Visible = false; btnSubmit.Visible = true; txtProjectComponent.Text = string.Empty; drpAdbTaskManager.SelectedIndex = 0; drpLineMinister.SelectedIndex = 0; drpNodalOfficer.SelectedIndex = 0; drpPorjectDirector.SelectedIndex = 0; // drpNodalOfficer.Items.Clear(); // drpPorjectDirector.Items.Clear(); } lblMessage.Text = string.Empty; #endregion }
public AppointedProjectManagementTeam DesignAndAppointProjectTeam(ProjectBrief mockProjectBrief, LessonsLog lessonsLog) { throw new NotImplementedException(); }
private void processData(IEnumerable <Specification> specifications, DataOP op, ProjectBrief project) { if (specifications == null) { return; } foreach (var specification in specifications) { specification.ProjectBriefId = project.Id; if (DataOP.AddNew == op) { _specificationRepository.Add(specification); } else if (DataOP.EDIT == op) { specification.Item = null; _specificationRepository.Update(specification); } else if (DataOP.DEL == op) { var requestItem = _specificationRepository.GetById(specification.Id); _specificationRepository.Delete(requestItem); } } }