private void btnSecession_Click(object sender, RoutedEventArgs e)
        {
            SQLiteManager sqliteManager = MainWindow.GetSqliteManager();

            string sql = "where Phone=\"" + tbPhone2.Text + "\"";

            sqliteManager.DBOpen();

            if (MyMessageBox.createMessageBox(2, "이름 : " + cbName.Text + " 핸드폰번호 : " + tbPhone2.Text + " 사용자를 삭제하시겠습니까?", "회원삭제확인") == 0)
            {
                sqliteManager.Delete(SQLiteData.TableMember, sql);
                sqliteManager.Drop(tbPhone2.Text);

                Thread thread = new Thread(() => MainWindow.runThread(3, MySQLData.TableMember, sql));
                thread.Start();
            }

            sqliteManager.DBClose();

            if (MemberData.GetMemberData.Phone == tbPhone2.Text)
            {
                TransitionPage.TransitionPages(0);
            }

            initCBSecession();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 스케줄 데이터 Delete
        /// </summary>
        /// <param name="phone">핸드폰번호</param>
        /// <param name="WageData">지울 데이터 구조체</param>
        /// <returns>영양받은 행수</returns>
        public int Delete(string phone, WageData WageData)
        {
            int    result = -1;
            string sql    = "where Date=\"" + WageData.Date + "\"";

            string year = SplitString(WageData.Date, '-')[0];

            sqlliteManager.DBOpen();
            result = sqlliteManager.Delete(phone + year, sql);
            sqlliteManager.DBClose();

            sql = "where Date=\"" + WageData.Date + "\" and Phone=\"" + phone + "\"";

            Thread thread = new Thread(() => MainWindow.runThread(3, MySQLData.TableWage, sql));

            thread.Start();

            return(result);
        }