コード例 #1
0
        public frmServiceIssue(frmMain mf, VSP.Business.Entities.PlanRecordKeeperProduct recordKeeperProduct, FormClosedEventHandler Close = null)
        {
            frmSplashScreen ss = new frmSplashScreen();

            ss.Show();
            Application.DoEvents();

            InitializeComponent();

            frmMain_Parent = mf;

            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            Application.AddMessageFilter(this);
            controlsToMove.Add(this.pnlSummaryTabHeader);
            controlsToMove.Add(this.panel16);
            controlsToMove.Add(this.label1);
            controlsToMove.Add(this.label23);

            FormClosed += Close;

            PreloadCbos();

            CurrentServiceIssue = new ServiceIssue();
            CurrentServiceIssue.PlanRecordKeeperProductId = recordKeeperProduct.Id;
            CurrentServiceIssue.AsOfDate = DateTime.Now;

            txtDescription.Focus();

            if (CurrentServiceIssue.PlanRecordKeeperProductId != null)
            {
                PlanRecordKeeperProduct planRecordKeeperProduct = new PlanRecordKeeperProduct((Guid)CurrentServiceIssue.PlanRecordKeeperProductId);
                Product product = new Product((Guid)planRecordKeeperProduct.ProductId);
                cboRecordKeeperProduct.Text = product.Name;
            }

            if (CurrentServiceIssue.AuditorId != null)
            {
                cboAuditor.Text = new DataIntegrationHub.Business.Entities.Auditor((Guid)CurrentServiceIssue.AuditorId).Name;
            }

            if (CurrentServiceIssue.PlanId != null)
            {
                Plan plan = new Plan((Guid)CurrentServiceIssue.PlanId);
                cboPlan.Text = plan.Name + " - " + plan.Description;
            }

            txtAsOfDate.Text = CurrentServiceIssue.AsOfDate.ToString("MM/dd/yyyy");

            CurrentTabLabel = label46; // Summary tab label
            highlightSelectedTabLabel(CurrentTabLabel);

            ss.Close();
            this.Show();
        }
コード例 #2
0
        public static DataTable GetAssociatedActive(PlanRecordKeeperProduct planRKProduct)
        {
            string sql = @"SELECT * FROM " + _tableName + " WHERE StateCode = 0 AND PlanId = \'" + planRKProduct.PlanId.ToString() + "\' AND RecordKeeperProductId = \'" + planRKProduct.RecordKeeperProductId + "\'";

            return(Access.VspDbAccess.ExecuteSqlQuery(sql));
        }
コード例 #3
0
        public static DataTable GetAssociated(PlanRecordKeeperProduct planRecordKeeperProduct)
        {
            string sql = @"SELECT * FROM " + _tableName + " WHERE PlanRecordKeeperProductId = '" + planRecordKeeperProduct.Id + "'";

            return(Access.VspDbAccess.ExecuteSqlQuery(sql));
        }