Example #1
0
        private void applicant_open_btn_Click(object sender, RoutedEventArgs e)
        {
            ModelUserData item = (sender as Button).DataContext as ModelUserData;

            grid.Children.Clear();
            grid.Children.Add(userDataSheet = new UserDataSheet(grid, item.id));
        }
Example #2
0
        ///<summary>
        ///Visszaadja az összes felhasználót.
        ///List<ModelUserData>
        ///</summary>
        public static List <ModelUserData> GetAll()
        {
            List <ModelUserData> list = new List <ModelUserData>();
            string username           = Session.ActiveDirectoryDomain;

            if (username.Length > 0)
            {
                list = ModelUserData.GetUserSession("SELECT * FROM users");
            }
            return(list);
        }
Example #3
0
        public static ModelUserData GetOwnDatas()
        {
            ModelUserData data     = new ModelUserData();
            string        username = Session.ActiveDirectoryDomain;

            if (username.Length > 0)
            {
                data = ModelUserData.GetUserSession("SELECT * FROM users WHERE username = '******'")[0];
            }
            return(data);
        }
Example #4
0
        private void Uj_interju_mentes_btn_Click(object sender, RoutedEventArgs e)
        {
            if (inter_helyszin.Text == "" || inter_idopont_hour.Text == "" || inter_idopont_hour_end.Text == "" || inter_date_year.Text == "" || inter_date_month.Text == "" || inter_date_day.Text == "")
            {
                InterviewInfo_tbx.Text = "Minden mező kitöltése kötelező";
                return;
            }
            if (Convert.ToUInt32(inter_date_year.Text) < 1900 ||
                Convert.ToUInt32(inter_date_year.Text) > 2100 ||
                Convert.ToUInt32(inter_date_day.Text) > 31 ||
                Convert.ToUInt32(inter_date_day.Text) < 1 ||
                Convert.ToUInt32(inter_date_month.Text) > 12 ||
                Convert.ToUInt32(inter_date_month.Text) < 1)
            {
                InterviewInfo_tbx.Text = "Dátum megadása hibás!";
                return;
            }
            int hour_start   = Convert.ToInt32(inter_idopont_hour.Text);
            int minute_start = (inter_idopont_minute.Text != "" ? Convert.ToInt32(inter_idopont_minute.Text) : 0);
            int hour_end     = Convert.ToInt32(inter_idopont_hour_end.Text);
            int minute_end   = (inter_idopont_minute_end.Text != "" ? Convert.ToInt32(inter_idopont_minute_end.Text) : 0);

            if (hour_start == 0 || hour_start > 24 || minute_start > 59 || hour_end == 0 || hour_end > 24 || minute_end > 59)
            {
                InterviewInfo_tbx.Text = "Időpont megadása hibás!";
                return;
            }
            if ((hour_start == hour_end && minute_end < minute_start) || hour_end < hour_start)
            {
                InterviewInfo_tbx.Text = "Időpont megadása hibás!";
                return;
            }

            string        datum   = inter_date_year.Text + "." + DateHandler.NormalForm(Convert.ToUInt32(inter_date_month.Text).ToString()) + "." + DateHandler.NormalForm(Convert.ToUInt32(inter_date_day.Text).ToString()) + ".";
            ModelUserData user    = UserData.GetById(projekt.hr_id);
            string        idopont = hour_start + ":" + (minute_start < 10 ? "0" + minute_start.ToString() : minute_start.ToString()) + " - " + hour_end + ":" + (minute_end < 10 ? "0" + minute_end.ToString() : minute_end.ToString());

            new Email().Send(user.email, new EmailTemplate().Meeting_igenyles(user.name, Session.UserData.name, inter_jelolt.Text, projekt.megnevezes_projekt, datum, idopont, inter_helyszin.Text, inter_leiras.Text));
            new ModelSzakmaiInterviewIgeny().Insert(new ModelSzakmaiInterviewIgeny {
                jelolt_id = Convert.ToInt32(inter_jelolt_id.Text), projekt_id = projekt.id, user_id = Session.UserData.id, state = 1
            });
            formLoader();
            Interview_Panel_Close();
        }
Example #5
0
 public static List <ModelUserData> GetByIdList(int userId)
 {
     return(ModelUserData.GetUserSession("SELECT * FROM users WHERE id = '" + userId + "'"));
 }
Example #6
0
 public static ModelUserData GetById(int userId)
 {
     return(ModelUserData.GetUserSession("SELECT * FROM users WHERE id = '" + userId + "'")[0]);
 }
Example #7
0
        private void UserValidationChecked(object sender, RoutedEventArgs e)
        {
            ModelUserData item = (sender as CheckBox).DataContext as ModelUserData;

            UserData.ModifyValidation(item.id, true);
        }