Exemplo n.º 1
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static int Insert(EletterSubscribeInfo model)
        {
            string strSQL = "INSERT INTO EletterSubscribes(Email,[Subject],CreateDateTime) VALUES(@Email,@Subject,GETDATE());SELECT @@IDENTITY;";

            SqlParameter[] parms =
            {
                new SqlParameter("Email",   SqlDbType.VarChar),
                new SqlParameter("Subject", SqlDbType.VarChar),
            };
            parms[0].Value = model.Email;
            parms[1].Value = model.Subject;
            return(Convert.ToInt32(SQLPlus.ExecuteScalar(CommandType.Text, strSQL, parms)));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 订阅
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static int Insert(EletterSubscribeInfo model)
 {
     return(EletterSubscribeManage.Insert(model));
 }