Exemple #1
0
 public void Update(AscmUnloadingPointMapLink ascmUnloadingPointMapLink)
 {
     try
     {
         using (ITransaction tx = YnDaoHelper.GetInstance().nHibernateHelper.GetCurrentSession().BeginTransaction())
         {
             try
             {
                 YnDaoHelper.GetInstance().nHibernateHelper.Update <AscmUnloadingPointMapLink>(ascmUnloadingPointMapLink);
                 tx.Commit();//正确执行提交
             }
             catch (Exception ex)
             {
                 tx.Rollback();//回滚
                 YnBaseClass2.Helper.LogHelper.GetLog().Error("修改失败(Update AscmUnloadingPointMapLink)", ex);
                 throw ex;
             }
         }
     }
     catch (Exception ex)
     {
         YnBaseClass2.Helper.LogHelper.GetLog().Error("修改失败(Save AscmUnloadingPointMapLink)", ex);
         throw ex;
     }
 }
Exemple #2
0
 public void Delete(AscmUnloadingPointMapLink ascmUnloadingPointMapLink)
 {
     try
     {
         YnDaoHelper.GetInstance().nHibernateHelper.Delete <AscmUnloadingPointMapLink>(ascmUnloadingPointMapLink);
     }
     catch (Exception ex)
     {
         YnBaseClass2.Helper.LogHelper.GetLog().Error("删除失败(Delete AscmUnloadingPointMapLink)", ex);
         throw ex;
     }
 }
Exemple #3
0
 public void Delete(int id)
 {
     try
     {
         AscmUnloadingPointMapLink ascmUnloadingPointMapLink = Get(id);
         Delete(ascmUnloadingPointMapLink);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #4
0
        public AscmUnloadingPointMapLink Get(int id)
        {
            AscmUnloadingPointMapLink ascmUnloadingPointMapLink = null;

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