public static void CheckClient(AccountController.Kind kind, NaturalPersonData data)
    {
        if (!NaturalPersonData.VerifyData(data))
        {
            GameEvent.instance.AddClientFail();
            return;
        }

        CreateClient(kind, data);
        GameEvent.instance.AddClientSucceded();
    }
 public static void CreateClient(AccountController.Kind kind, NaturalPersonData data)
 {
     kindClient = ClientController.Kind.natural;
     Client     = new NaturalPerson(data.id, data.contactNumber, data.fullName, data.occupation, data.address);
     AccountController.CreateAccountOf(kind);
 }
Exemple #3
0
 public void ReadData() => data = new NaturalPersonData(txtFullName.text,
                                                        txtId.text,
                                                        txtOccupation.text,
                                                        txtAddress.text,
                                                        txtContactNumber.text);
Exemple #4
0
 public static bool VerifyData(NaturalPersonData data) =>
 (data.id.Length != 10 ||
  data.contactNumber.Length != 10 ||
  data.fullName.Length == 0 ||
  data.occupation.Length == 0 ||
  data.address.Length == 0) ? false : true;