예제 #1
0
        private void SavePersonalButton_Click(object sender, EventArgs e)
        {
            UserProfile.PersonalInform PersonalInform = new UserProfile.PersonalInform();

            if (BirthDateTextEdit.Text.Length > 0)
            {
                PersonalInform.BirthDate = BirthDateTextEdit.Text;
            }

            //PersonalInform.PositionID = Convert.ToInt32(PositionComboBox.SelectedValue);
            PersonalInform.Education      = EduComboBox.Text;
            PersonalInform.EducationPlace = EduPlace.Text;

            for (int i = 0; i < LanguagesListBox.ItemCount; i++)
            {
                PersonalInform.Language += LanguagesListBox.Items[i].ToString() + "\r\n";
            }

            PersonalInform.DriveA       = DriveACheckBox.Checked;
            PersonalInform.DriveB       = DriveBCheckBox.Checked;
            PersonalInform.DriveC       = DriveCCheckBox.Checked;
            PersonalInform.DriveD       = DriveDCheckBox.Checked;
            PersonalInform.DriveE       = DriveECheckBox.Checked;
            PersonalInform.CombatArm    = CombatArmTextBox.Text;
            PersonalInform.MilitaryRank = MilitaryRankComboBox.Text;

            UserProfile.SetPersonalInform(PersonalInform);
        }
예제 #2
0
        private void UserComboBox_SelectionChangeCommitted(object sender, EventArgs e)
        {
            CurrentUserID = Convert.ToInt32(UserComboBox.SelectedValue);

            Contacts = UserProfile.GetContacts(CurrentUserID);

            ContactsToControls();

            PersonalInform = UserProfile.GetPersonalInform(CurrentUserID);

            PersonalToControls();
            cbClientManager.Checked = UserProfile.IsUserClientManager(CurrentUserID);
        }
예제 #3
0
        public UserInfoForm(string UserName)
        {
            InitializeComponent();

            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            UserProfile = new Infinium.UserProfile();

            CurrentUserID  = UserProfile.GetUserByName(UserName);
            Contacts       = UserProfile.GetContacts(CurrentUserID);
            PersonalInform = UserProfile.GetPersonalInform(CurrentUserID);

            CurrentName = UserName;

            Initialize();

            SetInfo();
        }
예제 #4
0
        public PersonalSettingsForm(LightStartForm tLightStartForm)
        {
            InitializeComponent();

            LightStartForm = tLightStartForm;

            UserProfile = new UserProfile();

            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            Initialize();

            TabNameLabel.Text = MainSelectPanelCheckSet.CheckedButton.Text;

            Contacts = UserProfile.GetContacts();

            ContactsToControls();

            PersonalInform = UserProfile.GetPersonalInform();

            Security = new Infinium.Security();


            label1.Text = "Infinium. Профиль пользователя. " + UserProfile.GetUserName();

            //PositionComboBox.DataSource = UserProfile.PositionsBindingSource;
            //PositionComboBox.DisplayMember = "Position";
            //PositionComboBox.ValueMember = "PositionID";

            PersonalToControls();

            while (!SplashForm.bCreated)
            {
                ;
            }
        }
예제 #5
0
        private string GetDrive(UserProfile.PersonalInform PI)
        {
            string Drive = "";

            if (PI.DriveA)
            {
                Drive += "A";
            }

            if (PI.DriveB)
            {
                if (Drive.Length > 0)
                {
                    Drive += ", B";
                }
                else
                {
                    Drive += "B";
                }
            }

            if (PI.DriveC)
            {
                if (Drive.Length > 0)
                {
                    Drive += ", C";
                }
                else
                {
                    Drive += "C";
                }
            }

            if (PI.DriveD)
            {
                if (Drive.Length > 0)
                {
                    Drive += ", D";
                }
                else
                {
                    Drive += "D";
                }
            }

            if (PI.DriveE)
            {
                if (Drive.Length > 0)
                {
                    Drive += ", E";
                }
                else
                {
                    Drive += "E";
                }
            }

            if (Drive.Length == 0)
            {
                Drive = "нет\\не указано";
            }

            return(Drive);
        }