public void Cart2() { functions db = GetComponent <functions>(); db.Conn(); string validator = ""; int session_id = PlayerPrefs.GetInt("Id"); int quantity = int.Parse(product3.text); db.CheckCart(ProductName2, session_id); Debug.Log(Checkif); if (Checkif == 0) { //update db.UpdateCart(session_id, ProductName2, quantity); } else { //insert db.AddCart(session_id, ProductName2, quantity); Debug.Log("Product Added to Cart"); } }
public void LoginUser() { functions db = GetComponent <functions>(); db.Conn(); string validator = ""; if (name.text == validator && password.text == validator) { errorhandler.text = "All Fields must be answered"; } else { db.LoginUser(name.text, password.text); errorhandler.text = result; } }
public void RegisterUser() { functions db = GetComponent <functions>(); db.Conn(); string validator = ""; if (name.text == validator && password.text == validator && password2.text == validator) { errorhandler.text = "All Fields must be answered"; } else { if (password.text == password2.text) { db.Register(name.text, password.text); Debug.Log("Succesfully registered"); } else { errorhandler.text = "Password didn't match"; } } }
void Start() { functions db = GetComponent <functions>(); db.Conn(); }