Exemplo n.º 1
0
        public bool UpdateKustomer(Kustomer oKustomer)
        {
            bool   result = false;
            string sql    = string.Format(@"UPDATE `kustomer`
                                        SET `Nama` = @1,
                                        `Alamat` = @2,
                                        `Email` = @3,
                                        `Hanphone` = @4,
                                        `Point` = @5
                                        WHERE `NoKustomer` = @0");

            result = db.Execute(sql, oKustomer.NoKustomer,
                                oKustomer.Nama,
                                oKustomer.Alamat,
                                oKustomer.Email,
                                oKustomer.Hanphone,
                                oKustomer.Point) == 1;
            return(result);
        }
Exemplo n.º 2
0
        public bool InsertKustomer(Kustomer oKustomer)
        {
            bool   result = false;
            string sql    = string.Format(@"`Nama`,
                                        `Alamat`,
                                        `Email`,
                                        `Hanphone`,
                                        `Point`)
                                        VALUES (@0,
                                                @1,
                                                @2,
                                                @3,
                                                @4)");

            result = db.Execute(sql, oKustomer.Nama,
                                oKustomer.Alamat,
                                oKustomer.Email,
                                oKustomer.Hanphone,
                                oKustomer.Point) == 1;
            return(result);
        }