Example #1
0
        private void LoadIssuedAs()
        {
            RSLib.COListItem li;
            SqlDataReader    dr;

            cboIssuedAs.Items.Clear();

            dr = CBReleaseDrawing.GetList();

            while (dr.Read())
            {
                li = new RSLib.COListItem();

                li.ID          = Convert.ToInt32(dr["ID"]);
                li.Description = dr["Name"].ToString();

                cboIssuedAs.Items.Add(li);
            }

            dr.Close();
        }
Example #2
0
        private void LoadObjectToScreen()
        {
            CBActivityCode   ac;
            CBDrawingSize    ds;
            CBReleaseDrawing rd;

            txtHGANumber.Text    = moDrwLog.HGANumber;
            txtClientNumber.Text = moDrwLog.ClientNumber;
            txtCADNumber.Text    = moDrwLog.CADNumber;
            ac = new CBActivityCode();
            ac.Load(moDrwLog.ActCodeID);
            cboActivityCodes.Text = ac.Code;


            if (moDrwLog.DepartmentID == 10)
            {
                SetDrawingType(1);
            }

            else
            {
                SetDrawingType(moDrwLog.IsTaskDrwgSpec);
            }

            ds = new CBDrawingSize();
            ds.Load(moDrwLog.DrawingSizeID);
            cboDrawingSizes.Text    = ds.Size;
            txtWBS.Text             = moDrwLog.WBS;
            txtBudgetHrs.Text       = moDrwLog.BudgetHrs.ToString("#,##0.00");
            txtPercentComplete.Text = moDrwLog.PercentComplete.ToString("#,##0.00");
            txtRemainingHrs.Text    = moDrwLog.RemainingHrs.ToString("#,##0.00");
            txtEarnedHrs.Text       = moDrwLog.EarnedHrs.ToString("#,##0.00");

            txtTitle1.Text = moDrwLog.Title1;
            txtTitle2.Text = moDrwLog.Title2;
            txtTitle3.Text = moDrwLog.Title3;
            txtTitle4.Text = moDrwLog.Title4;
            txtTitle5.Text = moDrwLog.Title5;
            txtTitle6.Text = moDrwLog.Title6;

            rdoTitle6IsTitle.Checked = moDrwLog.Title6IsTitle;
            rdoTitle5IsTitle.Checked = moDrwLog.Title5IsTitle;
            rdoTitle4IsTitle.Checked = moDrwLog.Title4IsTitle;
            rdoTitle3IsTitle.Checked = moDrwLog.Title3IsTitle;
            rdoTitle2IsTitle.Checked = moDrwLog.Title2IsTitle;
            rdoTitle1IsTitle.Checked = moDrwLog.Title1IsTitle;

            rdoTitle6IsDesc.Checked = moDrwLog.Title6IsDesc;
            rdoTitle5IsDesc.Checked = moDrwLog.Title5IsDesc;
            rdoTitle4IsDesc.Checked = moDrwLog.Title4IsDesc;
            rdoTitle3IsDesc.Checked = moDrwLog.Title3IsDesc;
            rdoTitle2IsDesc.Checked = moDrwLog.Title2IsDesc;
            rdoTitle1IsDesc.Checked = moDrwLog.Title1IsDesc;

            txtRevision.Text = moDrwLog.Revision;
            rd = new CBReleaseDrawing();
            rd.Load(moDrwLog.ReleasedDrawingID);
            cboIssuedAs.Text = rd.Name;

            if (moDrwLog.DateRevised == RSLib.COUtility.DEFAULTDATE)
            {
                dtpDateRevised.Checked = false;
            }
            else
            {
                dtpDateRevised.Checked = true;
                dtpDateRevised.Value   = moDrwLog.DateRevised;
            }

            if (moDrwLog.DateDue == RSLib.COUtility.DEFAULTDATE)
            {
                dtpDateDue.Checked = false;
            }
            else
            {
                dtpDateDue.Checked = true;
                dtpDateDue.Value   = moDrwLog.DateDue;
            }

            if (moDrwLog.DateLate == RSLib.COUtility.DEFAULTDATE)
            {
                dtpDateLate.Checked = false;
            }
            else
            {
                dtpDateLate.Checked = true;
                dtpDateLate.Value   = moDrwLog.DateLate;
            }

            bttSave.Enabled    = false;
            bttSaveNew.Enabled = false;
        }