public EdytujPost ( int id, string tytul, string tresc, int status ) : void | ||
id | int | |
tytul | string | |
tresc | string | |
status | int | |
return | void |
public void EdytujPost(int id, string tytul, string tresc, int status)
{
using (LinqTodbBlogDataContext context = new LinqTodbBlogDataContext())
{
var post = context.Posties.Single(p => p.id == id);
post.tytul = tytul;
post.tresc = tresc;
post.status = status;
post.data_modyfikacji = DateTime.Now;
context.SubmitChanges();
}
}
PostDAL::EdytujPost ( int id, string tytul, string tresc, int status, string tagi, string opis ) : void |