Exemple #1
0
        private void LoadItemList()
        {
            SqlDataReader dr;
            ListViewItem  lvi;

            this.Cursor = Cursors.WaitCursor;

            dr = CBDepartment.GetList();
            lvwItems.Items.Clear();
            while (dr.Read())
            {
                lvi = new ListViewItem();

                lvi.Text = dr["ID"].ToString();
                lvi.SubItems.Add(dr["Name"].ToString());
                lvi.SubItems.Add(dr["Description"].ToString());
                lvi.SubItems.Add(dr["AcctGroup"].ToString());

                lvwItems.Items.Add(lvi);
            }
            //lvwItems.ColumnClick += new ColumnClickEventHandler(lvwItems_ColumnClick);
            lvwItems.ColumnClick += new ColumnClickEventHandler(lvwItems_ColumnClick);
            // this line was added toooooooooooooooooooooooooooooooooo


            dr.Close();
            dr = null;

            sbPanStatus.Text = lvwItems.Items.Count.ToString() + " department(s)";

            this.Cursor = Cursors.Default;
        }
Exemple #2
0
        private void LoadDepartments()
        {
            RSLib.COListItem li;
            SqlDataReader    dr;

            dr = CBDepartment.GetList();

            clstDepartments.Items.Clear();

            li             = new RSLib.COListItem();
            li.ID          = 0;
            li.Description = "All";
            clstDepartments.Items.Add(li);

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

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

                clstDepartments.Items.Add(li);
            }

            clstDepartments.SetItemChecked(0, true);

            dr.Close();
        }
Exemple #3
0
        public void SetDefaultDepartment(int deptID)
        {
            CBDepartment d = new CBDepartment();

            miDeptID = deptID;
            d.Load(deptID);
            txtDepartment.Text = d.Name;
        }
Exemple #4
0
        private void ClearForm()
        {
            miDeptID  = 0;
            miProjID  = 0;
            miIssueID = 0;

            txtTranNumSuffix.Text = "";
            txtTranNumPrefix.Text = "";

            pictureBox1.Image   = imageList1.Images[5];
            ddtpTranDate.Value  = DateTime.Now;
            txtSentBy.Text      = "";
            txtTranCC.Text      = "";
            txtSubCategory.Text = "";
            txtTranTo.Text      = "";
            txtProjectLine.Text = "";
            txtProject.Text     = "";
            rtbRemarks.Text     = "";

            chkWeTransmit.Checked        = false;
            chkUnderSepCover.Checked     = false;
            chkDrawings.Checked          = false;
            chkSpecifications.Checked    = false;
            chkCommentOrApporval.Checked = false;
            chkReleaseForConst.Checked   = false;
            chkCorrespondence.Checked    = false;
            chkBrochures.Checked         = false;
            chkSentByEmail.Checked       = false;
            chkSentByMail.Checked        = false;
            chkApprovalAsNoted.Checked   = false;
            chkReturnFor.Checked         = false;
            chkSentByMessenger.Checked   = false;
            chkSentByOvernight.Checked   = false;

            txtDepartment.Text = "";
            lvwDocList.Items.Clear();
            bttRemove.Enabled = false;

            tssStatus1.Text = "Transmittal No.:";
            tssStatus2.Text = "0 Document(s)";

            tabPage1.Select();
            tlbbSave.Enabled  = false;
            tlbbPrint.Enabled = false;


            COAppState   aps = new COAppState();
            CBDepartment d   = new CBDepartment();

            aps.InitAppSettings();

            miDeptID = aps.Sch_LastDeptID;
            d.Load(miDeptID);
            txtDepartment.Text = d.Name;

            timer1.Enabled = true;
        }
Exemple #5
0
        private void ClearForm()
        {
            moDept = new CBDepartment();

            txtName.Text        = "";
            txtDescription.Text = "";
            mbItemChanged       = false;

            LoadEmployeeBox();
        }
Exemple #6
0
        void DepartmentSelected(int itmID)
        {
            CBDepartment d = new CBDepartment();

            d.Load(itmID);
            miDeptID           = itmID;
            txtDepartment.Text = d.Name;

            LoadDrawingList();
        }
Exemple #7
0
        void dl_OnItemSelected(int itmID)
        {
            CBDepartment d = new CBDepartment();

            d.Load(itmID);
            txtDepartment.Text = d.Description;
            miCurrDept         = itmID;

            ClearLog();
            LoadDrawingList();
            SetAccessForSecurityLevel(miCurrDept);
        }
Exemple #8
0
        void dl_OnDeptSelected(int itmID)
        {
            CBDepartment dept = new CBDepartment();

            dept.Load(itmID);

            //txtDiscipline.Text = dept.Number.ToString();
            txtDiscipline.Text = dept.Name;
            txtDiscipline.Tag  = dept.ID;
            moPci.DepartmentID = itmID;

            EnablePCISave();
        }
Exemple #9
0
        public static string GetNextPCINumber(int deptID, int projID)
        {
            CDbPCIInfo   dbDt    = new CDbPCIInfo();
            CBDepartment dept    = new CBDepartment();
            string       nextNum = "";
            int          pciCnt;

            dept.Load(deptID);
            pciCnt = dbDt.GetCountByProjectID(projID) + 1;
            //nextNum = dept.Name.Substring(0,1).ToUpper() + pciCnt.ToString("00");
            nextNum = pciCnt.ToString("00");        // only use number per Mike 061608

            return(nextNum);
        }
Exemple #10
0
        protected override void bttDelete_Click(object sender, EventArgs e)
        {
            base.bttDelete_Click(sender, e);

            int    tmpID = Convert.ToInt32(lvwItems.SelectedItems[0].Text);
            string val   = lvwItems.SelectedItems[0].SubItems[1].Text;

            DialogResult retVal = MessageBox.Show("Are you sure that you wish to remove \"" + val + "\"", "Remove Item", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (retVal == DialogResult.Yes)
            {
                CBDepartment.Delete(tmpID);
                LoadItemList();
            }
        }
Exemple #11
0
        private void ClearForm()
        {
            COAppState   aps = new COAppState();
            CBDepartment d   = new CBDepartment();

            aps.InitAppSettings();

            miCurrDept = aps.Sch_LastDeptID;
            miCurrLead = aps.Sch_EmplyID;
            d.Load(miCurrDept);
            txtDepartment.Text = d.Name;

            timer1.Enabled = true;

            CellStyle s = fgQuikUpdate.Styles.Add("ActualValues");

            s.ForeColor = Color.Transparent;
        }
Exemple #12
0
        void dl_OnItemSelected(int itmID)
        {
            CBDepartment d = new CBDepartment();

            d.Load(itmID);
            txtDepartment.Text  = d.Description;
            miCurrDept          = itmID;
            miCurrLead          = 0;
            txtProjectLead.Text = "";

            LoadDrawingList();

            if (mbUseGroup == false)
            {
                LoadGridWithDrawings();
            }

            SetAccessForSecurityLevel(miCurrDept);
        }
Exemple #13
0
        private void ClearForm()
        {
            COAppState   aps = new COAppState();
            CBDepartment d   = new CBDepartment();

            aps.InitAppSettings();

            miCurrDept = aps.Sch_LastDeptID;
            d.Load(miCurrDept);
            miCurrLead = 0;

            txtDepartment.Text = d.Name;

            ClearLog();

            LoadActivityCodes();
            LoadDrawingSizes();
            LoadIssuedAs();
        }
Exemple #14
0
        void dl_OnDeptSelected(int itmID)
        {
            CBDepartment d = new CBDepartment();

            if (itmID < 0)
            {
                txtDepartment.Text = "All";
                miDeptID           = 0;
                bttNew.Enabled     = false;
            }
            else
            {
                d.Load(itmID);
                txtDepartment.Text = d.Name;
                miDeptID           = itmID;
                bttNew.Enabled     = true;
            }

            tmrLoadPCIList.Enabled = true;
        }
Exemple #15
0
        private void ClearForm()
        {
            COAppState   aps = new COAppState();
            CBDepartment d   = new CBDepartment();

            aps.InitAppSettings();

            miDeptID = aps.Sch_LastDeptID;
            d.Load(miDeptID);
            txtDepartment.Text = d.Name;

            mdtPick = new DateTimePicker();


            mdsRelDocs    = new dsReleaseDocs();
            mdsRelDeletes = new dsReleaseDocs();
            tdbgDocList.Columns["Date"].Editor = mdtPick;
            tdbgDocList.SetDataBinding(mdsRelDocs, "ReleaseDocs", true);

            timer1.Enabled = true;
        }
Exemple #16
0
        private void LoadDepartmentBox()
        {
            SqlDataReader dr;

            RSLib.COListItem li;

            dr = CBDepartment.GetList();

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

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

                lstDept.Items.Add(li);
            }

            dr.Close();
        }
Exemple #17
0
        public void SetProject(int deptID, int projID, int weekID, decimal totPlan, decimal totFor, decimal totAct)
        {
            CBProject       p  = new CBProject();
            CBWeekList      w  = new CBWeekList();
            CBCustomer      c  = new CBCustomer();
            CBProjectBudget pb = new CBProjectBudget();
            CBDepartment    d  = new CBDepartment();

            p.Load(projID);
            miProjID = projID;

            w.Load(weekID);
            c.Load(p.CustomerID);

            pb.Load(deptID, projID);
            d.Load(deptID);

            txtNumber.Text      = p.Number;
            txtWeek.Text        = w.StartOfWeek.ToShortDateString();
            txtStartDate.Text   = p.DateStart.ToShortDateString();
            txtEndDate.Text     = p.DateEnd.ToShortDateString();
            txtDescription.Text = p.Description;
            txtCustomer.Text    = c.Name;
            if (d.Name.Length > 5)
            {
                lblBudget.Text = d.Name.Substring(0, 5) + " Bugt.:";
            }
            else
            {
                lblBudget.Text = d.Name + " Bugt.:";
            }
            txtTotBudget.Text   = pb.BudgetHrs.ToString(DISPFORMAT);
            txtTotPlanned.Text  = totPlan.ToString(DISPFORMAT);
            txtTotForecast.Text = totFor.ToString(DISPFORMAT);
            txtTotActual.Text   = totAct.ToString(DISPFORMAT);
            txtRemaining.Text   = ((decimal)(totFor + totAct)).ToString(DISPFORMAT);
        }
Exemple #18
0
        public void ClearForm(bool forceClear)
        {
            if (moPci != null && forceClear == false)
            {
                return;
            }

            moPci = new CBPCIInfo();

            txtDiscipline.Text         = "";
            lblPCINumber.Text          = CBPCIInfo.GetNextPCINumber(miDiscipline, miProject);
            txtInitiatedBy.Text        = "";
            lblProjectNumber.Text      = "";
            lblProjectTitle.Text       = "";
            txtPCITitle.Text           = "";
            dtpDateInitiated.Value     = DateTime.Now;
            txtRequestedBy.Text        = "";
            dtpDateRequested.Value     = DateTime.Now;
            txtDescription.Text        = "";
            rdoDesignError.Checked     = false;
            rdoVendorError.Checked     = false;
            rdoEstimatingError.Checked = false;
            rdoContractorError.Checked = false;
            rdoScheduleDelay.Checked   = false;
            rdoScopeAddition.Checked   = false;
            rdoScopeDeletion.Checked   = false;
            rdoDesignChange.Checked    = false;
            rdoOther.Checked           = false;
            txtOtherReason.Text        = "";
            txtOtherReason.Enabled     = false;
            chkMechPiping.Checked      = false;
            chkCSA.Checked             = false;
            chkProjAdmin.Checked       = false;
            chkProcess.Checked         = false;
            chkElectInst.Checked       = false;
            txtEstimatedHrs.Text       = "";
            txtEstimatedCost.Text      = "";
            txtEstimatedTIC.Text       = "";
            txtEstimatedAccuracy.Text  = "";

            txtScheduleImpact.Text = "";
            chkAppvProceed.Checked = false;
            chkAppvTrack.Checked   = false;
            chkNotAppvDNP.Checked  = false;
            txtProjMngr.Text       = "";
            lblDateApproved.Text   = "";

            if (miDiscipline != 0)
            {
                CBDepartment dept = new CBDepartment();

                dept.Load(miDiscipline);
                txtDiscipline.Text = dept.Name;
                moPci.DepartmentID = miDiscipline;
            }

            if (miProject != 0)
            {
                CBProject  proj = new CBProject();
                CBEmployee emp  = new CBEmployee();

                proj.Load(miProject);
                emp.Load(proj.ProjMngrID);
                emp.Load(proj.LeadProjMngrID);

                lblProjectNumber.Text = proj.Number;
                lblProjectTitle.Text  = proj.Description;
                txtProjMngr.Text      = emp.Name;

                moPci.ProjectID        = miProject;
                moPci.ProjectManagerID = proj.ProjMngrID;
            }

            mbNewPCNNeeded = false;
        }
Exemple #19
0
        private void LoadObjectToScreen()
        {
            CBDepartment dept = new CBDepartment();
            CBEmployee   emp  = new CBEmployee();
            CBProject    proj = new CBProject();

            dept.Load(moPci.DepartmentID);
            emp.Load(moPci.InitiatedByID);
            proj.Load(moPci.ProjectID);

            projectNumber = proj.Number; //////*************************************************6/25/15

            //  MessageBox.Show("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");

            //  MessageBox.Show(projectNumber);


            txtDiscipline.Text         = dept.Name;
            lblPCINumber.Text          = moPci.PCINumber;
            txtPCITitle.Text           = moPci.PCITitle;
            txtInitiatedBy.Text        = emp.Name;
            dtpDateInitiated.Value     = moPci.DateInitiated;
            lblProjectNumber.Text      = proj.Number;
            lblProjectTitle.Text       = proj.Description;
            txtRequestedBy.Text        = moPci.RequestedBy;
            dtpDateRequested.Value     = moPci.DateRequested;
            txtDescription.Text        = moPci.DescOfChange;
            rdoDesignError.Checked     = moPci.ReasonDesignError;
            rdoVendorError.Checked     = moPci.ReasonVendorError;
            rdoEstimatingError.Checked = moPci.ReasonEstimatingError;
            rdoContractorError.Checked = moPci.ReasonContractorError;
            rdoScheduleDelay.Checked   = moPci.ReasonSchedule;
            rdoScopeAddition.Checked   = moPci.ReasonScopeAdd;
            rdoScopeDeletion.Checked   = moPci.ReasonScopeDel;
            rdoDesignChange.Checked    = moPci.ReasonDesignChange;
            rdoOther.Checked           = moPci.ReasonOther;
            txtOtherReason.Text        = moPci.OtherReasonDesc;
            chkMechPiping.Checked      = moPci.AffectedMechPipe;
            chkCSA.Checked             = moPci.AffectedCSA;
            chkProjAdmin.Checked       = moPci.AffectedProjAdmin;
            chkProcess.Checked         = moPci.AffectedProcess;
            chkElectInst.Checked       = moPci.AffectedEandI;
            txtEstimatedHrs.Text       = moPci.EstimatedEngrHrs.ToString();
            txtEstimatedCost.Text      = moPci.EstimatedEngrDlrs.ToString("#,##0");
            txtEstimatedTIC.Text       = moPci.EstimatedEngrTIC.ToString("#,##0");
            txtEstimatedAccuracy.Text  = moPci.EstimatedAccuracy;

            txtScheduleImpact.Text = moPci.ScheduleImpact;
            chkAppvProceed.Checked = moPci.ApprovedProceed;
            chkAppvTrack.Checked   = moPci.ApprovedTrack;
            chkNotAppvDNP.Checked  = moPci.ApprovedNot;

            emp.Load(moPci.ProjectManagerID);
            txtProjMngr.Text = emp.Name;

            if (moPci.DateApproved == RevSol.RSUtility.DefaultDate())
            {
                lblDateApproved.Text = "";
            }
            else
            {
                lblDateApproved.Text = moPci.DateApproved.ToShortDateString();
            }

            mbNewPCNNeeded = false;
        }