public JsonResult Insert(Staff model) { try { model.Password = (model.Password == null ? Encryptor.MD5Hash(model.Id) : Encryptor.MD5Hash(model.Password)); int status = dao.Insert(model); return(Json(new { status = status })); } catch (Exception) { return(Json(new { status = 0 })); } }
public bool Insert(Staff nv) { return(staff.Insert(nv)); }