XSLT存档  

不及格的程序员-八神

 查看分类:  ASP.NET XML/XSLT JavaScripT   我的MSN空间Blog

//必须要引用的两个命空间

using System.Data;
using System.Linq;


public
void UpdateFormulaSet(FormulaSetFilterCondition entity) { var dataAccess = new FormulaAccess(); var dtsResult = dataAccess.getFormulaSet(new FormulaSetFilterCondition() {CoID = entity.CoID, iFormulaID = entity.iFormulaID }); if (dtsResult.Tables.Count > 0 && dtsResult.Tables[0].Rows.Count > 0 ) { var rowCollection = dtsResult.Tables[0].AsEnumerable().Count(exp=>exp["iID"].ToString() != entity.iID.ToString()); if(rowCollection > 0) { throw new Exception("该公司下已经存在公式"); } } dataAccess.UpdateFormulaSet(entity); }

-

public static string[] getLicInfo(string key, string strFilePath)
        {
            var dtsResult = LicenceFileReader.LicReader.ReadLicPath(strFilePath);
            var licInfo = dtsResult.tCommonLimit.OfType<tCommonLimitRow>().Where(exp => exp.ID.Equals(key)).FirstOrDefault();
            if(licInfo != null)
            {
                return new string[] { licInfo.ID, licInfo.Desc, licInfo.AuthFlag };
            }
            return null;          
        }

 

posted on 2018-05-03 15:29  不及格的程序员-八神  阅读(7)  评论(0编辑  收藏  举报