예제 #1
0
        public int Add(M_PageReg m_PageReg)
        {
            string strSQL = "INSERT INTO [" + strTableName + "](" + BLLCommon.GetFields(m_PageReg) + ")VALUES(" + BLLCommon.GetParas(m_PageReg) + ")";

            return(DataConverter.CLng(SqlHelper.ExecuteScalar(CommandType.Text, strSQL, m_PageReg.GetParameters())));
        }
예제 #2
0
        public object Update(M_PageReg m_PageReg)
        {
            string strSQL = "UPDATE [" + strTableName + "] SET " + BLLCommon.GetFieldAndPara(m_PageReg) + " WHERE [ID]=" + m_PageReg.ID;

            return(SqlHelper.ExecuteScalar(CommandType.Text, strSQL, m_PageReg.GetParameters()));
        }
예제 #3
0
 /// <summary>
 /// 根据ID更新
 /// </summary>
 public bool UpdateByID(M_PageReg m_PageReg)
 {
     return(Sql.UpdateByID(strTableName, PK, m_PageReg.ID, BLLCommon.GetFieldAndPara(m_PageReg), m_PageReg.GetParameters()));
 }