コード例 #1
0
ファイル: Program.cs プロジェクト: FerryWr25/ConsoleApp1
        static void Main(string[] args)
        {
            koneksi      con         = new koneksi();
            ReadJson     readJsonRun = new ReadJson();
            stemmingTala tala        = new stemmingTala();
            string       idDokument  = null;

            for (int i = 1; i < 2; i++)
            {
                con.openConnection();
                string textJson = null;
                int    run      = i;
                idDokument = readJsonRun.getId_Dokument(run);
                textJson   = readJsonRun.readtheJsonOffline(run);
                tala.runStemming_Tala(textJson);
                tala.getFrekunsiKata(idDokument);
                con.stopAccess();
            }
            Console.WriteLine("selesai Semua.....................");
            Console.Read();
            //  Console.ReadKey();
            // tala.cekKepunyaan("sandalnya");
            //tala.replace_Akhiran("sandalnya");
            //tala.replace_Akhiran("sandalmu");
            //tala.replace_Awalan1("menyatu");
            //Console.Read();
        }
コード例 #2
0
        /*public bool readclientid(Data.Client dc)
         * {
         *  bool stat = false;
         *  koneksi kon =new koneksi;
         *  try
         *  {
         *      kon.openConnection();
         *      string query = "select client_id from tb_reservation";
         *
         *  }
         * }*/
        public bool loginadmin(string no_identity, string phone)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            Data.Client dc = new Data.Client();
            kon.openConnection();
            string query = "select no_identity, phone from tb_client where no_identity='admin' and phone='admin'";

            kon.ExecuteQueries(query);
            stat = true;
            kon.closeConnection();

            return(stat);
        }
コード例 #3
0
        public bool bilpay(Data.Reservation dr)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "update tb_reservation set pembayaran='" + dr.Pembayaran + "',kembalian=@kembalian-'" + dr.Pembayaran + "', keterangan='" + dr.Keterangan + "' where no_reservation='" + dr.No_reservasi + "' ";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #4
0
        public bool deletereservation(Data.Reservation dre)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "delete from tb_reservation where no_reservation='" + dre.No_reservasi + "'";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #5
0
        public bool editreservation(Data.Reservation drv)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "update tb_reservation set client_id='" + drv.Client_id + "',room_type='" + drv.Room_type + "',room_price='" + drv.Room_price + "', no_room='" + drv.No_room + "',booking_date='" + drv.Booking_date + "', date_in='" + drv.Date_in + "',date_out='" + drv.Date_out + "', cara_bayar='" + drv.Carabayar + "' where no_reservation='" + drv.No_reservasi + "'";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #6
0
        public bool deleteroom(Data.Room drm)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "delete from tb_room where room_id='" + drm.Roomid + "'";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #7
0
        public bool editroom(Data.Room dro)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "update tb_room set type_room='" + dro.Roomtype + "',price_room='" + dro.Roomprice + "' where room_id='" + dro.Roomid + "'";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #8
0
        public bool deleteclient(Data.Client dc)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "delete from tb_client where no_identity='" + dc.No_identity + "'";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #9
0
        public bool updateclient(Data.Client dc)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "update tb_client set firstname='" + dc.Firstname + "',lastname='" + dc.Lastname + "',phone='" + dc.Phone + "', country='" + dc.Country + "' where no_identity='" + dc.No_identity + "'";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
            }
            return(stat);
        }
コード例 #10
0
        public bool reservationclient(Data.Reservation drv)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "insert into tb_reservation values('" + drv.No_reservasi + "', '" + drv.Client_id + "', '" + drv.Room_type + "', '" + drv.Room_price + "', '" + drv.No_room + "', '" + drv.Booking_date + "', '" + drv.Date_in + "', '" + drv.Date_out + "', null, null, '" + drv.Room_price + "' * '" + drv.No_room + "','" + drv.Carabayar + "', null, null, 'Belum Lunas')";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            return(stat);
        }
コード例 #11
0
        public bool addroom(Data.Room dr)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "insert into tb_room values('" + dr.Roomid + "', '" + dr.Roomtype + "', '" + dr.Roomprice + "')";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            return(stat);
        }
コード例 #12
0
        public bool registrasi(Data.Client dc)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "insert into tb_client values('" + dc.No_identity + "', '" + dc.Firstname + "', '" + dc.Lastname + "', '" + dc.Phone + "', '" + dc.Country + "')";
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            return(stat);
        }
コード例 #13
0
        public bool searchreservid(Data.Reservation dr)
        {
            bool    stat = false;
            koneksi kon  = new koneksi();

            try
            {
                kon.openConnection();
                string query = "select * from tb_reservation where no_reservation='" + dr.No_reservasi + "'";
                //kon.ExecuteQueries("select * from tb_reservation where no_reservation='" + dr.No_reservasi + "'");
                kon.ExecuteQueries(query);
                stat = true;
                kon.closeConnection();
            }

            catch (Exception ex)
            {
            }
            return(stat);
        }