Esempio n. 1
0
        internal static HYJLInfo GetInfoById(int innerid)
        {
            HYJLInfo  info = new HYJLInfo();
            DataTable dt   = SQLHelper.ExecuteDataTable("select * from T_hyjl where id = @id", innerid);

            info.Id            = innerid;
            info.MeetingDate   = Convert.ToDateTime(dt.Rows[0]["meetingdate"].ToString());
            info.Topic         = dt.Rows[0]["topic"].ToString();
            info.AttachContent = dt.Rows[0]["attachcontent"].ToString();
            return(info);
        }
Esempio n. 2
0
        internal static int UpdateInfo(HYJLInfo hyjlinfo, int id)
        {
            object obj = SQLHelper.ExecuteNonQuery("update T_hyjl set meetingdate=@meetingdate, topic=@topic, attachcontent=@attachcontent where id=@id", hyjlinfo.MeetingDate, hyjlinfo.Topic, hyjlinfo.AttachContent, id);

            return(Convert.ToInt32(obj));
        }
Esempio n. 3
0
        internal static int AddInfo(HYJLInfo hyjlinfo)
        {
            object obj = SQLHelper.ExecuteScalar("insert into T_hyjl(meetingdate, topic, attachcontent) output inserted.id values(@meetingdate, @topic, @attachcontent)", hyjlinfo.MeetingDate, hyjlinfo.Topic, hyjlinfo.AttachContent);

            return(Convert.ToInt32(obj));
        }