public IActionResult ChangeStatus(int sellerId, SellerStatus status) { if (loginPersistence.PersistLogin() == null) { return(Json("Not login")); } try { eCommerce.UpdateSellerStatus(sellerId, status, out ICollection <string> errors); if (errors.Any()) { string errorString = ""; foreach (string error in errors) { errorString += error + "\n"; } errorString.Remove(errorString.Length - 1); return(Json(errorString)); } } catch (Exception e) { return(Json(e.Message)); } return(Json("")); }
public void SetStatus(SellerStatus status) { this.SellerStatus = status; this.UpdatedOn = DateTime.UtcNow; }