Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
 public bool Destroy(object Id)
 {
     return(Newspost.Destroy(Id) == 1);
 }
Example #5
0
 public bool Delete(object Id)
 {
     return(Newspost.Delete(Id) == 1);
 }