public ProgressProject GetProgressByID(string id)
        {
            ProgressProject progress = null;
            string          query    = "select * from dbo.Comment where sID = '" + id + "'";
            DataTable       data     = DataController.Instance.ExecuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                progress = new ProgressProject(item);
                return(progress);
            }
            return(progress);
        }
Example #2
0
        public void ProgressBinding()
        {
            ProgressProject progress = ProgressController.Instance.GetProgressByID(checkid);

            if (progress.sComment1 != null && progress.sComment1 != "")
            {
                txtComment1.Text = progress.sComment1;
            }
            textBox2.Text       = progress.sComment2;
            textBox3.Text       = progress.sComment3;
            progressBar.Maximum = 90;
            if (progress.iTime == 0)
            {
                txtComment1.ReadOnly = true;
                textBox2.ReadOnly    = true;
                textBox3.ReadOnly    = true;
                cbComment2.Enabled   = false;
                cbComment3.Enabled   = false;
            }
            if (progress.iTime == 1)
            {
                cbComment1.Checked = true;
                textBox2.ReadOnly  = true;
                textBox3.ReadOnly  = true;
                progressBar.Value  = 30;
            }
            if (progress.iTime == 2)
            {
                cbComment1.Checked = true;
                cbComment2.Checked = true;
                textBox3.ReadOnly  = true;
                progressBar.Value  = 60;
            }
            if (progress.iTime == 3)
            {
                cbComment1.Checked = true;
                cbComment2.Checked = true;
                cbComment3.Checked = true;
                progressBar.Value  = 90;
            }
        }