using Microsoft.VisualBasic.CompilerServices;

//namespace SE0085.StCl
namespace FAS_LIB
{
    public class scAssociateData
    {
        private int _AssocId;
        private int _AssocEmpId;
        private string _AssocLaborName;
        private string _AssocFirstName;
        private string _AssocLastName;
        private string _AssocLogin;
        private string _AssocSESA;
        private long _AssocUserPriv;
        private string _AssocEmail;
        private bool _AssocQCInsp;
        private bool _AssocActive;
        private string _AssocPhone;
        private string _AssocExt;
        private scAssociateData.emToStringSelect _ToStringSelect;

        public int AssocId
        {
            get
            {
                return this._AssocId;
            }
            set
            {
                this._AssocId = value;
            }
        }

        public int AssocEmpId
        {
            get
            {
                return this._AssocEmpId;
            }
            set
            {
                this._AssocEmpId = value;
            }
        }

        public string AssocLaborName
        {
            get
            {
                return this._AssocLaborName.Trim();
            }
            set
            {
                this._AssocLaborName = value.Trim();
            }
        }

        public string AssocFirstName
        {
            get
            {
                return this._AssocFirstName.Trim();
            }
            set
            {
                this._AssocFirstName = value.Trim();
            }
        }

        public string AssocLastName
        {
            get
            {
                return this._AssocLastName.Trim();
            }
            set
            {
                this._AssocLastName = value.Trim();
            }
        }

        public string AssocLogin
        {
            get
            {
                return this._AssocLogin.Trim();
            }
            set
            {
                this._AssocLogin = value.Trim().ToUpper();
            }
        }

        public string AssocSESA
        {
            get
            {
                return this._AssocSESA.Trim();
            }
            set
            {
                this._AssocSESA = value.Trim();
            }
        }

        public long AssocUserPriv
        {
            get
            {
                return this._AssocUserPriv;
            }
            set
            {
                this._AssocUserPriv = value;
            }
        }

        public string AssocEmail
        {
            get
            {
                return this._AssocEmail.Trim();
            }
            set
            {
                this._AssocEmail = value.Trim();
            }
        }

        public bool AssocQCInsp
        {
            get
            {
                return this._AssocQCInsp;
            }
            set
            {
                this._AssocQCInsp = value;
            }
        }

        public bool AssocActive
        {
            get
            {
                return this._AssocActive;
            }
            set
            {
                this._AssocActive = value;
            }
        }

        public string AssocPhone
        {
            get
            {
                return this._AssocPhone.Trim();
            }
            set
            {
                this._AssocPhone = value.Trim();
            }
        }

        public string AssocExt
        {
            get
            {
                return this._AssocExt.Trim();
            }
            set
            {
                this._AssocExt = value.Trim();
            }
        }

        public string AssocName
        {
            get
            {
                return this._AssocFirstName.Trim() + " " + this._AssocLastName.Trim();
            }
        }

        public string AssocNameExt
        {
            get
            {
                return this._AssocFirstName.Trim() + " " + this._AssocLastName.Trim() + " - Ext: " + this._AssocExt.Trim();
            }
        }

        public scAssociateData.emToStringSelect ToStringSelect
        {
            get
            {
                return this._ToStringSelect;
            }
            set
            {
                this._ToStringSelect = value;
            }
        }

        public scAssociateData()
        {
            this.InitAssoc();
        }

        public void InitAssoc()
        {
            this._AssocId = 0;
            this._AssocEmpId = 0;
            this._AssocLaborName = "";
            this._AssocFirstName = "";
            this._AssocLastName = "";
            this._AssocLogin = "";
            this._AssocSESA = "";
            this._AssocUserPriv = 0L;
            this._AssocEmail = "";
            this._AssocQCInsp = false;
            this._AssocActive = false;
            this._AssocPhone = "(803)776-7500";
            this._AssocExt = "x";
            this._ToStringSelect = scAssociateData.emToStringSelect.NameExt;
        }

        public override string ToString()
        {
            switch (this._ToStringSelect)
            {
                case scAssociateData.emToStringSelect.NameExt:
                    return this.AssocName.Trim() + " - Ext: " + this.AssocExt.Trim();
                case scAssociateData.emToStringSelect.EmpIdName:
                    return Conversions.ToString(this.AssocEmpId) + " - " + this.AssocName.Trim();
                case scAssociateData.emToStringSelect.SESAName:
                    return this.AssocSESA + " - " + this.AssocName.Trim();
                case scAssociateData.emToStringSelect.NameEmail:
                    return this.AssocName.Trim() + " - Email: " + this.AssocEmail.Trim();
                case scAssociateData.emToStringSelect.LoginName:
                    return this.AssocLogin + " - " + this.AssocName.Trim();
                case scAssociateData.emToStringSelect.LaborName:
                    return this.AssocLaborName + " - " + this.AssocName.Trim();
                case scAssociateData.emToStringSelect.BusinessCard:
                    return this.AssocName.Trim() + " - Phone: " + this.AssocPhone.Trim() + " x" + this.AssocExt.Trim() + " - Email: " + this.AssocEmail.Trim();
                default:
                    return this.AssocName.Trim() + " - Ext: " + this.AssocExt.Trim();
            }
        }

        public enum emToStringSelect
        {
            NameExt,
            EmpIdName,
            SESAName,
            NameEmail,
            LoginName,
            LaborName,
            BusinessCard,
        }
    }
}
