Esempio n. 1
0
        /// <summary>
        /// 현재사용자 정보를 저장
        /// </summary>
        /// <param name="loginData">입력된 사용자 데이터</param>
        public void SetMemberData(LoginData loginData)
        {
            SQLiteDataReader rdr;
            SQLiteCommand    command;
            AuthorityManager authorityManager = new AuthorityManager();
            string           sql = "where Phone=\"" + loginData.Phone + "\"";

            sqliteManager.DBOpen();

            command = sqliteManager.Select(SQLiteData.TableMember, sql);
            rdr     = command.ExecuteReader();

            while (rdr.Read())
            {
                MemberData.GetMemberData.Phone    = rdr["Phone"].ToString();
                MemberData.GetMemberData.Password = rdr["Password"].ToString();
                MemberData.GetMemberData.Name     = rdr["Name"].ToString();
                MemberData.GetMemberData.Wage     = rdr["Wage"].ToString();
                MemberData.GetMemberData.AuthorityData.Authority = Convert.ToInt32(rdr["Authority"]);
                MemberData.GetMemberData.Task = Convert.ToInt32(rdr["Task"]);
            }

            sqliteManager.DBClose();

            MemberData.GetMemberData.AuthorityData = authorityManager.Select();
        }
Esempio n. 2
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            //현재 자용자의 이름 표시
            lbName.Content = MemberData.GetMemberData.Name;
            AuthorityManager authorityManager = new AuthorityManager();

            if (authorityManager.SignUpCheck(btnSingUP) == 1)
            {
                btnTab2_Click(this, null);
            }
            if (authorityManager.AuthorityCheck(btnWage) == 1)
            {
                btnTab1_Click(this, null);
            }
            if (authorityManager.ScheduleCheck(btnSchedule) == 1)
            {
                btnTab3_Click(this, null);
            }
        }