public bool UpdateTransmitDetails(Model_TransmitDetails model) { string strSql = @"update TAB_System_TransmitDetails set strOrgTrainManGUID=@strOrgTrainManGUID, strPublicationID=@strPublicationID readState=@readState readCount=@readCount where nid=@nid"; SqlParameter[] sqlParams = { new SqlParameter("strOrgTrainManGUID", SqlDbType.VarChar, 50, model.strOrgTrainManGUID), new SqlParameter("strPublicationID", model.strPublicationID), new SqlParameter("readState", model.readState), new SqlParameter("readCount", model.readCount), new SqlParameter("nid", model.nid) }; return(SqlHelper.ExecuteNonQuery(SqlHelper.ConnString, CommandType.Text, strSql, sqlParams) > 0); }
public bool AddTransmitDetails(Model_TransmitDetails model) { string strSql = @"insert into [TAB_System_TransmitDetails] ([strOrgTrainManGUID] ,[strPublicationID] ,[readState] ,[readCount]) values (@strOrgTrainManGUID ,@strPublicationID ,@readState ,@readCount)"; SqlParameter[] sqlParams = { new SqlParameter("strOrgTrainManGUID", SqlDbType.VarChar, 50, model.strOrgTrainManGUID), new SqlParameter("strPublicationID", model.strPublicationID), new SqlParameter("readState", model.readState), new SqlParameter("readCount", model.readCount) }; return(SqlHelper.ExecuteNonQuery(SqlHelper.ConnString, CommandType.Text, strSql, sqlParams) > 0); }