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

            info.Id            = innerid;
            info.AttachContent = dt.Rows[0]["details"].ToString();
            return(info);
        }
예제 #2
0
        internal static int UpdateInfo(CommonModelInfo commoninfo, int id)
        {
            object obj = SQLHelper.ExecuteNonQuery("update T_bgwj set details=@details where id=@id", commoninfo.AttachContent, id);

            return(Convert.ToInt32(obj));
        }
예제 #3
0
        internal static int AddInfo(CommonModelInfo commoninfo)
        {
            object obj = SQLHelper.ExecuteScalar("insert into T_bgwj(details) output inserted.id values(@details)", commoninfo.AttachContent);

            return(Convert.ToInt32(obj));
        }