示例#1
0
        /// <summary>
        /// 增、改K_SinglePage表

        /// </summary>
        /// <param name="tranType">操作类型,NEW=增,EDIT=改</param>
        /// <param name="paramsModel"></param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string Save(string tranType, KingTop.Model.Single.SinglePage paramsModel)
        {
            string isOk = "";

            try
            {
                SqlParameter returnValue = new SqlParameter("@ReturnValue", SqlDbType.Int, 4);
                returnValue.Direction = ParameterDirection.Output;

                string cmdText = "proc_K_SinglePageSave";

                SqlParameter[] paras = new SqlParameter[] {
                    new SqlParameter("tranType", tranType),
                    new SqlParameter("ID", paramsModel.ID),
                    new SqlParameter("Title", paramsModel.Title),
                    new SqlParameter("Content", paramsModel.Content),
                    new SqlParameter("ClassID", paramsModel.ClassID),
                    new SqlParameter("IsPub", paramsModel.IsPub),
                    new SqlParameter("AddDate", paramsModel.AddDate),
                    new SqlParameter("AddMan", paramsModel.AddMan),
                    new SqlParameter("NodeCode", paramsModel.NodeCode),
                    new SqlParameter("SiteID", paramsModel.SiteID),

                    returnValue
                };

                SQLHelper.ExecuteNonQuery(SQLHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, cmdText, paras);
                isOk = returnValue.Value.ToString();
            }
            catch (Exception ex)
            {
                isOk = ex.Message;
            }

            return(isOk);
        }
示例#2
0
        /// <summary>
        /// 增、改K_SinglePage表

        /// </summary>
        /// <param name="tranType">操作类型,NEW=增,EDIT=改</param>
        /// <param name="SinModel"></param>
        /// <returns>返回大于0的数字操作正常,返回非数字表示操作错误,返回的是系统错误说明</returns>
        public string Save(string trantype, KingTop.Model.Single.SinglePage sinModel)
        {
            return(dal.Save(trantype, sinModel));
        }