public void Insert(int Personid, int Categoryid, string Subject, string Content, bool Isurgent, bool?Deleted, DateTime Createdon, DateTime?Modifiedon, string Createdby, string Modifiedby) { Newspost item = new Newspost(); item.Personid = Personid; item.Categoryid = Categoryid; item.Subject = Subject; item.Content = Content; item.Isurgent = Isurgent; item.Deleted = Deleted; item.Createdon = Createdon; item.Modifiedon = Modifiedon; item.Createdby = Createdby; item.Modifiedby = Modifiedby; item.Save(UserName); }
public void Update(int Id, DateTime Createdon, int Categoryid, string Subject, string Content, bool Isurgent) { Newspost item = new Newspost(); item.MarkOld(); item.IsLoaded = true; item.Id = Id; item.Createdon = Createdon; item.Categoryid = Categoryid; item.Subject = Subject; item.Content = Content; item.Isurgent = Isurgent; item.Save(UserName); }
public int Insert(DateTime Createdon, string personName, int Categoryid, string Subject, string Content, bool Isurgent) { Newspost item = new Newspost(); item.Createdon = Createdon; item.Personid = Person.FetchByUsername(personName).Id; item.Categoryid = Categoryid; item.Subject = Subject; item.Content = Content; item.Isurgent = Isurgent; item.Deleted = false; item.Save(UserName); return(item.Id); }