diff --git a/17020996_nguyen_trong_ruong/my-system/pom.xml b/17020996_nguyen_trong_ruong/my-system/pom.xml index eb4a84e..e966c69 100644 --- a/17020996_nguyen_trong_ruong/my-system/pom.xml +++ b/17020996_nguyen_trong_ruong/my-system/pom.xml @@ -19,12 +19,12 @@ - - org.springframework.boot - spring-boot-starter-web - - - + + org.springframework.boot + spring-boot-starter-web + + + org.apache.tomcat.embed tomcat-embed-jasper @@ -33,13 +33,28 @@ javax.servlet jstl + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + + + mysql + mysql-connector-java + + + + + org.springframework.boot + spring-boot-starter-test + test + - - org.springframework.boot - spring-boot-starter-test - test - - + diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/AddingController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/AddingController.java index f4417f5..1998434 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/AddingController.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/AddingController.java @@ -1,16 +1,21 @@ package com.jwb.bankservice; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.ModelAttribute; +import com.jwb.bankservice.models.Customer; +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; -@Controller +@RestController public class AddingController { + @Autowired + CustomerServices cServices; + @PostMapping(value="/add-customer") - public String addCustomer(@ModelAttribute("customerInfo") Customer customer) { - int id = CustomerList.customerList.size(); - customer.setId(id); - CustomerList.customerList.add(customer); - return "redirect:/customer-list"; + public String addCustomer(@RequestBody Customer customer) { + cServices.addCustomer(customer); + return "/"; } } \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/CustomerList.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/CustomerList.java deleted file mode 100644 index 0088bd6..0000000 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/CustomerList.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.jwb.bankservice; - -import java.util.ArrayList; - -public class CustomerList { - public static ArrayList customerList = new ArrayList(); - static{ - customerList.add(new Customer(0,"abc", "abc@mail.com", "12345", 123)); - customerList.add(new Customer(1,"abcabc", "abcabc@mail.com", "54321", 123)); - } -} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/DeletingController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/DeletingController.java new file mode 100644 index 0000000..c8bcf81 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/DeletingController.java @@ -0,0 +1,22 @@ +package com.jwb.bankservice; + +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.RequestBody; + + +@RestController +public class DeletingController { + @Autowired + CustomerServices cServices; + + @PostMapping(value="/delete") + public void delCustomer(@RequestBody String delId) { + delId = delId.substring(3,delId.length()); + int id = Integer.parseInt(delId); + cServices.delCustomerList(id); + } +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/EditingController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/EditingController.java index 0bedf2d..f6cdcb8 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/EditingController.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/EditingController.java @@ -1,18 +1,21 @@ package com.jwb.bankservice; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.ModelAttribute; +import com.jwb.bankservice.models.Customer; +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; -@Controller +@RestController public class EditingController { + @Autowired + CustomerServices cServices; + @PostMapping(value="/edit-customer") - public String addCustomer(@ModelAttribute("customerInfo") Customer customer) { - int id = CustomerList.customerList.size()-1; - CustomerList.customerList.get(id).setName(customer.getName()); - CustomerList.customerList.get(id).setEmail(customer.getEmail()); - CustomerList.customerList.get(id).setPhoneNumber(customer.getPhoneNumber()); - CustomerList.customerList.get(id).setPassword(customer.getPassword()); - return "redirect:/customer-list"; + public String addCustomer(@RequestBody Customer customer) { + cServices.editCustomer(customer); + return "/"; } } \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/ListCustomerController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/ListCustomerController.java index 94a6b74..9c73355 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/ListCustomerController.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/ListCustomerController.java @@ -1,39 +1,34 @@ package com.jwb.bankservice; +import com.jwb.bankservice.models.Customer; +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @Controller public class ListCustomerController { + @Autowired + CustomerServices cServices; - @RequestMapping(value = {"/", "/customer-list" }, method = RequestMethod.GET) + @GetMapping(value = {"/", "/customer-list" }) public String index(ModelMap modelMap) { - modelMap.addAttribute("customerList", CustomerList.customerList); + modelMap.addAttribute("customerList", cServices.getAllCustomer()); return "CustomerList"; } - @RequestMapping(value = { "/adding-form" }, method = RequestMethod.GET) - public String addForm(ModelMap modelmap) { - modelmap.addAttribute("customerInfo", new Customer()); - return "Add"; - } @GetMapping(value="/editing-form") public String editForm(@RequestParam(name="customerId") Integer id, ModelMap modelMap) { - modelMap.addAttribute("customerInfo", CustomerList.customerList.get(id)); + Customer c = cServices.getCustomer(id); + modelMap.addAttribute("customerInfo", c); return "Edit"; } - @GetMapping(value="/login-form") - public String loginForm(@RequestParam(name="customerId") Integer id, ModelMap modelMap){ - modelMap.addAttribute("customerInfo", CustomerList.customerList.get(id)); - return "Login"; - } - @GetMapping(value="/transfering-form") - public String transferingForm(@RequestParam(name="customerId") Integer id, ModelMap modelMap){ - modelMap.addAttribute("customerId", id); - return "Transfer"; + + @GetMapping(value = { "/adding-form" }) + public String addForm(ModelMap modelmap) { + return "Add"; } } \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LoginController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LoginController.java index e1a8e61..ce76ca0 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LoginController.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LoginController.java @@ -1,17 +1,30 @@ package com.jwb.bankservice; +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class LoginController { + @Autowired + CustomerServices cServices; + + @GetMapping(value="/login-form") + public String loginForm(@RequestParam(name="customerId") Integer id, ModelMap modelMap){ + modelMap.addAttribute("customerInfo", cServices.getCustomer(id)); + return "Login"; + } + @PostMapping(value="/login") public String addCustomer(@RequestParam(name="id") Integer id, @RequestParam(name="pw") String password) { - System.out.println(id); - if (CustomerList.customerList.get(id).getPassword().equals(password)){ - CustomerList.customerList.get(id).setLogin(1); + if (cServices.login(id, password)){ + return "redirect:/customer-list"; } - return "redirect:/customer-list"; + return "Error"; } } \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LogoutController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LogoutController.java index 5ddec68..fb90c5f 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LogoutController.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/LogoutController.java @@ -1,14 +1,20 @@ package com.jwb.bankservice; +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class LogoutController { + @Autowired + CustomerServices cServices; + @GetMapping(value="/logout") public String logout(@RequestParam(name="customerId") Integer id){ - CustomerList.customerList.get(id).setLogin(0); + cServices.logout(id); return "redirect:/customer-list"; } } \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/Search.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/Search.java new file mode 100644 index 0000000..4c31e27 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/Search.java @@ -0,0 +1,26 @@ +package com.jwb.bankservice; + +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + + +@RestController +public class Search { + @Autowired + CustomerServices cServices; + + @PostMapping(value="/search") + public List searchCustomer(@RequestBody String data) { + int n = data.length(); + data = data.substring(1, n-1); + List listResult = cServices.search(data); + return listResult; + } +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/TransferingController.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/TransferingController.java index 7cae1f8..cafb6fc 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/TransferingController.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/TransferingController.java @@ -1,18 +1,30 @@ package com.jwb.bankservice; +import com.jwb.bankservice.services.CustomerServices; + +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class TransferingController { + @Autowired + CustomerServices cServices; + + @PostMapping(value="/transfering-form") + public String transferingForm(@RequestParam(name="customerId") Integer id, @RequestParam(name="availableBalance") Integer balance, ModelMap modelMap){ + modelMap.addAttribute("customerId", id); + modelMap.addAttribute("balance", balance); + return "Transfer"; + } + @PostMapping(value="/transfer") public String transfer(@RequestParam(name = "sentId") Integer sId, @RequestParam(name="receivedId") Integer rId, @RequestParam(name="amount") Integer amount){ - if (rId >= CustomerList.customerList.size() || rId == sId) return "Error"; - else{ - CustomerList.customerList.get(sId).transferMoney(amount); - CustomerList.customerList.get(rId).receiveMoney(amount); - } - return "redirect:/customer-list"; + if (rId == sId) return "Error"; + if (amount > cServices.getCustomer(sId).getBalance()) return "Error"; + cServices.transferMoney(sId, rId, amount); + return "redirect:/"; } } \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/Customer.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/models/Customer.java similarity index 68% rename from 17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/Customer.java rename to 17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/models/Customer.java index f37ee1a..6f6acd6 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/Customer.java +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/models/Customer.java @@ -1,22 +1,32 @@ -package com.jwb.bankservice; +package com.jwb.bankservice.models; +import javax.persistence.*; + +@Entity +@Table(name = "Customer") public class Customer { + @Id + @GeneratedValue(strategy= GenerationType.IDENTITY) + private int id; - private String name, email, phoneNumber, password = "123456"; - private int id, balance, login = 0; + @Column(name = "name") + private String name; - public Customer() { + @Column(name = "email") + private String email; - } + @Column(name = "phone") + private String phoneNumber; - public Customer(int id, String name, String email, String phoneNumber, int balance) { - this.id = id; - this.name = name; - this.email = email; - this.phoneNumber = phoneNumber; - this.balance = balance; - } + @Column(name = "password") + private String password = "123456"; + + @Column(name = "balance") + private int balance; + @Column(name = "login") + private int login = 1; + public int getId(){ return id; } diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/repositories/CustomerRepository.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/repositories/CustomerRepository.java new file mode 100644 index 0000000..8abff5e --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/repositories/CustomerRepository.java @@ -0,0 +1,10 @@ +package com.jwb.bankservice.repositories; + +import com.jwb.bankservice.models.Customer; +import org.springframework.stereotype.Repository; +import org.springframework.data.jpa.repository.JpaRepository; + +@Repository +public interface CustomerRepository extends JpaRepository{ + +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/services/CustomerServices.java b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/services/CustomerServices.java new file mode 100644 index 0000000..d8244f0 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/java/com/jwb/bankservice/services/CustomerServices.java @@ -0,0 +1,75 @@ +package com.jwb.bankservice.services; + +import com.jwb.bankservice.models.Customer; +import com.jwb.bankservice.repositories.CustomerRepository; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class CustomerServices { + @Autowired + private CustomerRepository customerRepository; + + public Customer getCustomer(int id){ + return customerRepository.getOne(id); + } + + public List getAllCustomer(){ + return customerRepository.findAll(); + } + + public void addCustomer(Customer ctm){ + customerRepository.save(ctm); + } + + public void delCustomerList(int id){ + customerRepository.deleteById(id); + } + + public void editCustomer(Customer customer){ + customerRepository.save(customer); + } + + public void logout(int id){ + Customer c = customerRepository.getOne(id); + c.setLogin(0); + customerRepository.save(c); + } + + public boolean login(int id, String pass){ + Customer c = customerRepository.getOne(id); + if (c.getPassword().equals(pass)){ + c.setLogin(1); + customerRepository.save(c); + return true; + } + return false; + } + + public void transferMoney(int sId, int rId, int amount){ + Customer sentCustomer = customerRepository.getOne(sId); + Customer receivedCustomer = customerRepository.getOne(rId); + sentCustomer.transferMoney(amount); + receivedCustomer.receiveMoney(amount); + customerRepository.save(sentCustomer); + customerRepository.save(receivedCustomer); + } + + public List search(String data){ + String result = new String(); + + List listResult = new ArrayList<>(); + for(Customer customer : getAllCustomer()){ + if (customer.getName().contains(data) || customer.getEmail().contains(data) || customer.getPhoneNumber().contains(data)){ + result += " " + customer.getName() + " " + customer.getEmail() + " " + customer.getPhoneNumber() + " Edit "; + listResult.add(result); + result = ""; + } + } + return listResult; + } +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/application.properties b/17020996_nguyen_trong_ruong/my-system/src/main/resources/application.properties index 3bf1cbf..2cccfed 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/resources/application.properties +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/application.properties @@ -1,2 +1,15 @@ +server.port=8080 + spring.mvc.view.prefix=/WEB-INF/jsp/ -spring.mvc.view.suffix=.jsp \ No newline at end of file +spring.mvc.view.suffix=.jsp + +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.url = jdbc:mysql://localhost:3306/bankdata +spring.datasource.username=root +spring.datasource.password=ruong0302 + +spring.jpa.show-sql=true +spring.jpa.properties.hibernate.format_sql=true +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect +spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext +spring.jpa.hibernate.ddl-auto=update \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Add.css b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Add.css new file mode 100644 index 0000000..620c850 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Add.css @@ -0,0 +1,59 @@ +.submit:hover { + background-color: #104f66; + color: white; +} + +.submit { + width: 120px; + text-align: center; + background-color: #15ace6; + border: none; + border-radius: 3px; + color: white; + cursor: pointer; + outline: none; + font-size: 20px; + margin: auto; +} + +input { + width: 320px; + height: 38px; + border-radius: 3px; + border: none; + margin-bottom: 30px; + text-indent: 10px; +} + +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; +} + +fieldset { + padding-top: 12px; + padding-bottom: 12px; + background-color: #4CAF50; + color: white; + text-align: center; + width: 480px; + margin: auto; +} + +legend { + padding-left: 10px; + padding-right: 10px; + background-color: tomato; + color: white; + font-size: 25px; +} + +label { + width: 130px; + text-align: left; + font-size: 20px; + float: left; +} +body{ + background-color: aliceblue; +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/CustomerList.css b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/CustomerList.css index a3625d8..d98fedd 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/CustomerList.css +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/CustomerList.css @@ -21,9 +21,24 @@ background-color: #4CAF50; color: white; } -#customerTable td:last-child{ + +#customerTable .tdButton{ text-align: center; } + +.search{ + float: right; +} + +#searchInput{ + width: 300px; + height: 25px; + font-size: 20px; + text-indent: 10px; +} + +#searchResult tr:hover {background-color: #ddd;} + .button { background-color: #8a948a; border: none; diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Edit.css b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Edit.css new file mode 100644 index 0000000..bca2e01 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Edit.css @@ -0,0 +1,55 @@ +.submit:hover { + background-color: #104f66; + color: white; +} + +.submit { + width: 120px; + text-align: center; + background-color: #15ace6; + border: none; + border-radius: 3px; + color: white; + cursor: pointer; + outline: none; + font-size: 20px; + margin: auto; +} + +input { + width: 320px; + height: 38px; + border-radius: 3px; + border: none; + margin-bottom: 30px; + text-indent: 10px; +} + + +fieldset { + padding-top: 12px; + padding-bottom: 12px; + background-color: #4CAF50; + color: white; + text-align: center; + width: 480px; + margin: auto; +} + +legend { + padding-left: 10px; + padding-right: 10px; + background-color: tomato; + color: white; + font-size: 25px; +} + +label { + width: 130px; + text-align: left; + font-size: 20px; + float: left; +} +body{ + background-color: aliceblue; +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Error.css b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Error.css new file mode 100644 index 0000000..527fa00 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Error.css @@ -0,0 +1,9 @@ +p{ + text-align: left; + color: red; + font-size: 40px; + font-weight: bold; +} +a{ + color: blue; +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Login.css b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Login.css new file mode 100644 index 0000000..2af7cc0 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Login.css @@ -0,0 +1,58 @@ +fieldset { + padding-top: 12px; + padding-bottom: 12px; + background-color: #4CAF50; + color: white; + text-align: center; + width: 480px; + height: 480px; + margin: auto; +} + +label { + width: 130px; + text-align: left; + font-size: 20px; + float: left; +} + +input { + width: 320px; + height: 38px; + border-radius: 3px; + border: none; + /* text-align: left; */ + margin-bottom: 30px; + text-indent: 10px; +} + +.submit:hover { + background-color: #104f66; + color: white; +} + +.submit { + width: 120px; + text-align: center; + background-color: #15ace6; + border: none; + padding: 10px 36px; + border-radius: 3px; + color: white; + cursor: pointer; + outline: none; + font-size: 20px; + margin: auto; +} + +legend { + padding-left: 10px; + padding-right: 10px; + background-color: tomato; + color: white; + font-size: 25px; +} + +body{ + background-color: aliceblue; +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Transfer.css b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Transfer.css new file mode 100644 index 0000000..cbfd6e4 --- /dev/null +++ b/17020996_nguyen_trong_ruong/my-system/src/main/resources/static/css/Transfer.css @@ -0,0 +1,60 @@ +.submit:hover { + background-color: #104f66; + color: white; +} + +.submit { + width: 120px; + text-align: center; + background-color: #15ace6; + border: none; + border-radius: 3px; + color: white; + cursor: pointer; + outline: none; + font-size: 20px; + margin: auto; + text-align: center; +} + +input { + width: 320px; + height: 38px; + border-radius: 3px; + border: none; + margin-bottom: 30px; + text-indent: 10px; +} + +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; +} + +fieldset { + padding-top: 12px; + padding-bottom: 12px; + background-color: #4CAF50; + color: white; + text-align: center; + width: 480px; + margin: auto; +} + +legend { + padding-left: 10px; + padding-right: 10px; + background-color: tomato; + color: white; + font-size: 25px; +} + +label { + width: 130px; + text-align: left; + font-size: 20px; + float: left; +} +body{ + background-color: aliceblue; +} \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Add.jsp b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Add.jsp index 9f15aaf..843833a 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Add.jsp +++ b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Add.jsp @@ -1,25 +1,58 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %> + - - - Add customer - - - -
- Add customer - Name:
-
- Email:
-
- Phone number:
-
- Balance:
-
- -
-
- + + + + + Add customer + + + + + +
+ Add customer + +
+ +
+ +
+ +
+ +
+

+ +
+ + \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/CustomerList.jsp b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/CustomerList.jsp index 2a926a4..4f31ba0 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/CustomerList.jsp +++ b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/CustomerList.jsp @@ -1,62 +1,114 @@ <%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %> - - - Customer list - - - - -
- - + + + + Customer list + + + + + + +
+
+
+ + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
IdNameEmailPhoneBalance
NameEmailPhoneBalance
${customer.name}${customer.email}${customer.phoneNumber}${customer.balance} -
- - -
+
${customer.id}${customer.name}${customer.email}${customer.phoneNumber}${customer.balance} +
+ + +
+
+
+ + + +
+
+ -
- - -
+
+
+ + +
+
+
+ + +
+
+ +
+
+ -
- - -
- - - - -
- - -
- -
- - - - - - - \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Edit.jsp b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Edit.jsp index 949502d..5106401 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Edit.jsp +++ b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Edit.jsp @@ -1,25 +1,59 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %> + - - - Edit customer - - - -
- Edit customer - Name:
-
- Email:
-
- Phone number:
-
- Password:
-
- -
-
- + + + + + Edit customer + + + + + + +
+ Edit customer + + +
+ +
+ +
+ +
+ + + +
+ + \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Error.jsp b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Error.jsp index 1344bec..6ac5b41 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Error.jsp +++ b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Error.jsp @@ -4,11 +4,10 @@ Error +

Error!

-
- -
+ back to Home \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Login.jsp b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Login.jsp index 597f02e..ea101f4 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Login.jsp +++ b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Login.jsp @@ -1,21 +1,24 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - - - Login - - -
-
- Login - Email:
- ${customerInfo.email}
-
- Password:
-
- -
-
- + + + + + Login + + + +
+
+ Login +
+ + Password: +
+ +
+
+ + \ No newline at end of file diff --git a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Transfer.jsp b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Transfer.jsp index fbb8e83..8cd2a20 100644 --- a/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Transfer.jsp +++ b/17020996_nguyen_trong_ruong/my-system/src/main/webapp/WEB-INF/jsp/Transfer.jsp @@ -3,18 +3,21 @@ + Transfer -
+
Transfer - ID:
-
+
+
+ +
- Amount:
-
- + +
+
diff --git a/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/vcs.xml b/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/workspace.xml b/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/workspace.xml index a7cf663..3735200 100644 --- a/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/workspace.xml +++ b/17021115_vu_van_tung/FirstProjectSpringBoot/my_system/.idea/workspace.xml @@ -1,7 +1,20 @@ - + + + + + + + + + + + + + +