示例#1
0
        public frmMain()
        {
            InitializeComponent();

            this.m_iIssueIndex	= 0;
            this.m_oIssue				= new CIssue();
            this.m_oIssueList		= new CIssue();
            // Perform the initial data retrieval, gather the data necessary and display it
            Initialize();
        }
示例#2
0
 public frmAddModifyIssue(CIssue pIssue)
     : this()
 {
     this.m_oIssue		= pIssue;
     this.BindIssue();
 }
示例#3
0
        void BindIssue()
        {
            m_oIssue = new CIssue(DbConn.ConnectionString);
            m_oIssue.Get(Convert.ToInt16(this.m_aiIssueIds[m_iIssueIndex]));

            this.ClearBindings();

            if(m_oIssue.Data.Rows.Count > 0)
            {
                txtIssueID.DataBindings.Add("text", m_oIssue.Data, "issue_id");
                txtDateCreated.DataBindings.Add("text", m_oIssue.Data, "date_created");
                txtDateLastModified.DataBindings.Add("text", m_oIssue.Data, "date_last_modified");
                txtIssueDesc.DataBindings.Add("text", m_oIssue.Data, "issue_desc");
                txtIssueType.DataBindings.Add("text", m_oIssue.Data, "issue_type_desc");
                txtSystem.DataBindings.Add("text", m_oIssue.Data, "system_desc");
                txtSubSystem.DataBindings.Add("text", m_oIssue.Data, "subsystem_desc");
                txtContact.DataBindings.Add("text", m_oIssue.Data, "contact_name");
                ckbSolved.DataBindings.Add("checked", m_oIssue.Data, "issue_solved");

                lbxCauses.DataSource				= m_oIssue.Causes.Data;
                lbxCauses.DisplayMember			= "cause_desc";
                lbxCauses.ValueMember				= "cause_id";

                lbxSolutions.DataSource			= m_oIssue.Solutions.Data;
                lbxSolutions.DisplayMember	= "solution_desc";
                lbxSolutions.ValueMember		= "solution_id";
            }
        }
示例#4
0
        private void BindIssue()
        {
            this.InitializeBindings();

            if(m_oIssue == null)
            {
                m_oIssue = new CIssue(this.m_oIssue.DataObject.ConnectionString);
                m_oIssue.Get(-1);
            }

            if(m_oIssue.Data != null)
            {
                if(m_oIssue.Data.Rows.Count > 0)
                {
                    txtIssueDesc.DataBindings.Add("text", m_oIssue.Data, "issue_desc");
                    cmbIssueTypes.DataBindings.Add("text", m_oIssue.Data, "issue_type_desc");
                    ckbSolved.DataBindings.Add("checked", m_oIssue.Data, "issue_solved");
                    cmbSystems.DataBindings.Add("text", m_oIssue.Data, "system_desc");
                    cmbContacts.DataBindings.Add("text", m_oIssue.Data, "contact_name");

                    this.BindCauses();
                    this.BindSolutions();
                }
            }
            else			// Adding new issue, no ID yet.
            {
                this.ToggleDisplay();
            }
            this.cmbSystems_SelectedIndexChanged(null, null);
        }