string doUpdate(Note note) { IFirebaseClient client = new FirebaseClient(config); var response = client.Update("notes/" + note.Id, note); return(response.StatusCode.ToString().ToLower()); }
public IActionResult UpdateStudentDetail(Student objStudent) { IFirebaseClient client = new FirebaseClient(objFireConfig); var setter = client.Update("StudentList/" + objStudent.StudentId, objStudent); return(Content("Hello, " + objStudent.StudentId + "-" + objStudent.StudentName + " Updated Successfully!!")); }
public ActionResult Edit(User user) { var newUpdate = new { name = user.Name, phone = user.Phone }; FirebaseClient.Update("users/" + user.UserID, newUpdate); return(RedirectToAction("Index", "StaffCustomer")); }
public static void UpdateBetAndDeletePending(PlacedBet placedBet, Pending pending) { try { var client = new FirebaseClient(_config); client.Update(Helper.GetPlacedBetUrl(pending.DatePlaced, pending.CustomId, pending.Sport), placedBet); client.Delete($"pending_game_evaluation/{pending.CustomId}"); } catch (Exception e) { Console.WriteLine("Could not update/delete entries in the database. See error message: " + e.Message); } }
public static bool ResetPassword(string username, string oldPassword, string newPassword) { User u = JsonConvert.DeserializeObject <User>(client.Get(userPath + username).Body); if (u.Password.Equals(oldPassword)) { u.Password = newPassword; client.Update(userPath + username, u); return(true); } else { return(false); } }
public string UpdateFireBaseData(string AuthSecret, string BasePath, string item) { IFirebaseConfig config = new FirebaseConfig { AuthSecret = AuthSecret, BasePath = BasePath }; IFirebaseClient client = new FirebaseClient(config); var todo = new { name = "Execute UPDATE", priority = 1 }; FirebaseResponse response = client.Update(item, todo); string retorno = JsonConvert.SerializeObject(response).ToString(); return retorno; }