예제 #1
0
        internal static XZJXInfo GetInfoById(int innerid)
        {
            XZJXInfo  info = new XZJXInfo();
            DataTable dt   = SQLHelper.ExecuteDataTable("select * from T_xzjx where id = @id", innerid);

            info.Id            = innerid;
            info.ApplyMonth    = Convert.ToDateTime(dt.Rows[0]["applymonth"].ToString());
            info.AttachContent = dt.Rows[0]["attachcontent"].ToString();
            return(info);
        }
예제 #2
0
        internal static int UpdateInfo(XZJXInfo xzjxinfo, int id)
        {
            object obj = SQLHelper.ExecuteNonQuery("update T_xzjx set applymonth=@applymonth, attachcontent=@attachcontent where id=@id", xzjxinfo.ApplyMonth, xzjxinfo.AttachContent, id);

            return(Convert.ToInt32(obj));
        }
예제 #3
0
        internal static int AddInfo(XZJXInfo xzjxinfo)
        {
            object obj = SQLHelper.ExecuteScalar("insert into T_xzjx(applymonth, attachcontent) output inserted.id values(@applymonth, @attachcontent)", xzjxinfo.ApplyMonth, xzjxinfo.AttachContent);

            return(Convert.ToInt32(obj));
        }