Пример #1
0
    /// <summary>
    /// 添加新闻信息
    /// </summary>
    /// <param name="oRModel"></param>
    /// <returns></returns>
    public string AddNewsInfo(NewsModel oNModel, out int NewsId)
    {
        string ret = Config.Fail;

        NewsId = 0;
        try
        {
            ret = nb.AddNewsInfo(oNModel);
            int  Id   = 0;
            bool flag = Int32.TryParse(ret, out Id);
            if (flag && Id > 0)
            {
                NewsId = Id;
                return(Config.Success);
            }
        }
        catch (Exception ex)
        {
            WriteLog.WriteExceptionLog("NewsBLL.AddNewsInfo()", ex);
            return(Config.ExceptionMsg);
        }
        return(ret);
    }