public void Update(AscmGetMaterialLog ascmGetMaterialLog)
 {
     try
     {
         using (ITransaction tx = YnDaoHelper.GetInstance().nHibernateHelper.GetCurrentSession().BeginTransaction())
         {
             try
             {
                 YnDaoHelper.GetInstance().nHibernateHelper.Update <AscmGetMaterialLog>(ascmGetMaterialLog);
                 tx.Commit();//正确执行提交
             }
             catch (Exception ex)
             {
                 tx.Rollback();//回滚
                 YnBaseClass2.Helper.LogHelper.GetLog().Error("修改失败(Update AscmGetMaterialLog)", ex);
                 throw ex;
             }
         }
     }
     catch (Exception ex)
     {
         YnBaseClass2.Helper.LogHelper.GetLog().Error("修改失败(Update AscmGetMaterialLog)", ex);
         throw ex;
     }
 }
        public AscmGetMaterialLog Get(int id)
        {
            AscmGetMaterialLog ascmGetMaterialLog = null;

            try
            {
                ascmGetMaterialLog = YnDaoHelper.GetInstance().nHibernateHelper.Get <AscmGetMaterialLog>(id);
            }
            catch (Exception ex)
            {
                YnBaseClass2.Helper.LogHelper.GetLog().Error("查询失败(Get AscmGetMaterialLog)", ex);
                throw ex;
            }
            return(ascmGetMaterialLog);
        }