private void CreateBudgetDS() { mdsBudget = CBProjectBudget.GetListDSByProjID(0); tdbgBudget.SetDataBinding(mdsBudget, "Table", true); }
private void LoadObjectToScreen() { CBCustomer c = new CBCustomer(); CBLocation l = new CBLocation(); CBEmployee e = new CBEmployee(); CBRateSchedule rs = new CBRateSchedule(); txtNumber.Text = moProj.Number; txtDescription.Text = moProj.Description; c.Load(moProj.CustomerID); cboCustomer.Text = c.Name; txtCustomerNumber.Text = moProj.CustomerProjNumber; LoadLocationBox(moProj.CustomerID); l.Load(moProj.LocationID); cboLocation.Text = l.FullName; e.Load(moProj.ProjMngrID); cboManager.Text = e.Name; e.Load(moProj.LeadProjMngrID); cboManagerLead.Text = e.Name; e.Load(moProj.RelationshipMngrID); cboRelationship.Text = e.Name; rs.Load(moProj.RateSchedID); cboRateSched.Text = rs.Name; if (rs.IsMultiplier == true) { lblMultiplier.Visible = true; txtMultiplier.Visible = true; txtMultiplier.Text = moProj.Multiplier.ToString("#,##0.00"); lblOverlay.Visible = true; txtOverlay.Visible = true; txtOverlay.Text = moProj.Overlay.ToString("#,##0.00"); } else { lblMultiplier.Visible = false; txtMultiplier.Visible = false; txtMultiplier.Text = "0.00"; lblOverlay.Visible = false; txtOverlay.Visible = false; txtOverlay.Text = "0.00"; } txtPOAmount.Text = moProj.POAmount; dtpStart.Value = moProj.DateStart; dtpEnd.Value = moProj.DateEnd; chkActiveProposal.Checked = moProj.IsProposal; chkIsBooked.Checked = moProj.IsBooked; chkIsActive.Checked = moProj.IsActive; chkIsGovernment.Checked = moProj.IsGovernment; chkIsMaster.Checked = moProj.IsMaster; chkIsFixedRate.Checked = moProj.IsFixedRate; if (moProj.MasterID > 0) { cboMasterJobs.Text = CBProject.GetNumberByID(moProj.MasterID); } cboReportStatus.SelectedIndex = moProj.ReportingStatus; rtbNotes.Text = moProj.Notes; mdsBudget = CBProjectBudget.GetListDSByProjID(moProj.ID); tdbgBudget.SetDataBinding(mdsBudget, "Table", true); TotalBudget(); RSLib.COSecurity sec = new RSLib.COSecurity(); CBUser u = new CBUser(); sec.InitAppSettings(); u.Load(sec.UserID); if (u.IsAdministrator == true || u.IsEngineerAdmin == true) { chkActiveProposal.Enabled = true; chkIsActive.Enabled = true; chkIsBooked.Enabled = true; } }