public ActionResult PersonelInfoUpdate(Models.Person person) { TblPerson tblPerson = new TblPerson(); string sqlStr = String.Format("update People set Name='{0}',Surname='{1}',Address='{2}',Mail='{3}',Description='{4}',Linkedin='{5}',Github='{6}',Twitter='{7}',Facebook='{8}',Youtube='{9}',Instagram='{10}' where ID='{11}'", HttpUtility.UrlDecode(person.Name), HttpUtility.UrlDecode(person.Surname), HttpUtility.UrlDecode(person.Address), HttpUtility.UrlDecode(person.Mail), HttpUtility.UrlDecode(person.Description), HttpUtility.UrlDecode(person.Linkedin), HttpUtility.UrlDecode(person.Github), HttpUtility.UrlDecode(person.Twitter), HttpUtility.UrlDecode(person.Facebook), HttpUtility.UrlDecode(person.Youtube), HttpUtility.UrlDecode(person.Instagram), person.ID ); int status = tblPerson.ExecuteQuery(sqlStr); return RedirectToAction("About"); }
public void PhotoPathUpdate(string photoPath) { TblPerson tblPerson = new TblPerson(); string sqlStr = String.Format("update People set Photo='{0}' where ID= (select top 1 ID from People order by ID)", photoPath); int status = tblPerson.ExecuteQuery(sqlStr); }