Ejemplo n.º 1
0
        private void ClearForm()
        {
            mbItemChanged = false;
            moTitle       = new CBEmployeeTitle();

            txtName.Text = "";
        }
Ejemplo n.º 2
0
        private void LoadItemList()
        {
            SqlDataReader dr;
            ListViewItem  lvi;

            this.Cursor = Cursors.WaitCursor;

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

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

                lvwItems.Items.Add(lvi);
            }

            lvwItems.ColumnClick += new ColumnClickEventHandler(lvwItems_ColumnClick);
            // *************** this line was added, MZ

            dr.Close();
            dr = null;

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

            this.Cursor = Cursors.Default;
        }
Ejemplo n.º 3
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)
            {
                CBEmployeeTitle.Delete(tmpID);
                LoadItemList();
            }
        }
Ejemplo n.º 4
0
        private void LoadTitleBox()
        {
            SqlDataReader dr;

            RSLib.COListItem li;

            dr = CBEmployeeTitle.GetList();

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

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

                cboTitle.Items.Add(li);
            }

            dr.Close();
        }
Ejemplo n.º 5
0
        private void LoadObjectToScreen()
        {
            CBEmployeeTitle et = new CBEmployeeTitle();

            txtNumber.Text = moEmp.Number;
            txtName.Text   = moEmp.Name;
            txtAbbrev.Text = moEmp.Abbrev;

            et.Load(moEmp.EmpTitleID);
            cboTitle.Text = et.Name;

            chkIsProjMngr.Checked = moEmp.IsProjectManager;
            chkIsRelMngr.Checked  = moEmp.IsRelManager; //******************************Added 7/13/2015

            numMinHrs.Value       = moEmp.MinHrs;
            numMaxReg.Value       = moEmp.MaxRegHrs;
            numMaxAll.Value       = moEmp.MaxAllHrs;
            chkActive.Checked     = moEmp.IsActive;
            chkContractor.Checked = moEmp.Contractor;
            cmbLocation.Text      = moEmp.OfficeLocation;
            cmbType.Text          = moEmp.EngineerType;

            LoadEmpDeptBox();
        }