Ejemplo n.º 1
0
        /// <summary>
        /// Fills the operation list.
        /// </summary>
        private void FillOperationList()
        {
            cboOperatorCode.Items.Clear();

            RT2020.DAL.StaffCollection staffList = RT2020.DAL.Staff.LoadCollection(new String[] { "StaffNumber" }, true);
            cboOperatorCode.DataSource    = staffList;
            cboOperatorCode.DisplayMember = "StaffNumber";
            cboOperatorCode.ValueMember   = "StaffId";
            cboOperatorCode.SelectedIndex = 0;
        }
Ejemplo n.º 2
0
        private void FillcboCreateBy()
        {
            string[] orderBy = new string[] { "StaffNumber" };
            RT2020.DAL.StaffCollection staffCol = RT2020.DAL.Staff.LoadCollection(orderBy, true);
            staffCol.Add(new RT2020.DAL.Staff());
            cboCreateBy.Items.Clear();
            cboCreateBy.DataSource    = staffCol;
            cboCreateBy.DisplayMember = "StaffNumber";
            cboCreateBy.ValueMember   = "StaffId";

            if (DAL.Common.Config.CurrentUserId != Guid.Empty)
            {
                cboCreateBy.SelectedValue = DAL.Common.Config.CurrentUserId;
            }
            else
            {
                cboCreateBy.SelectedIndex = cboCreateBy.Items.Count - 1;
            }
        }