public void UpdateDetail(AscmWmsLogisticsDetailLog ascmWmsLogisticsDetailLog)
        {
            try
            {
                using (ITransaction tx = YnDaoHelper.GetInstance().nHibernateHelper.GetCurrentSession().BeginTransaction())
                {
                    try
                    {
                        YnDaoHelper.GetInstance().nHibernateHelper.Update(ascmWmsLogisticsDetailLog);

                        tx.Commit();//正确执行提交
                    }
                    catch (Exception ex)
                    {
                        tx.Rollback();//回滚
                        throw ex;
                    }
                }
            }
            catch (Exception ex)
            {
                YnBaseClass2.Helper.LogHelper.GetLog().Error("更新失败(Update AscmWmsLogisticsDetailLog)", ex);
                throw ex;
            }
        }
        public void Save(AscmWmsLogisticsMainLog wmsLogisticsMainLog, List<WmsAndLogistics> listWmsAndLogistics)
        {
            try
            {
                int maxId_Detail = YnDaoHelper.GetInstance().nHibernateHelper.GetMaxId("select max(id) from AscmWmsLogisticsDetailLog");
                List<AscmWmsLogisticsDetailLog> listWmsLogisticsDetailLog = new List<AscmWmsLogisticsDetailLog>();
                foreach (WmsAndLogistics wmsAndLogistics in listWmsAndLogistics)
                {
                    AscmWmsLogisticsDetailLog wmsLogisticsDetailLog = new AscmWmsLogisticsDetailLog();
                    wmsLogisticsDetailLog.id = ++maxId_Detail;
                    wmsLogisticsDetailLog.mainId = wmsLogisticsMainLog.id;
                    wmsLogisticsDetailLog.wipEntityId = wmsAndLogistics.wipEntityId;
                    wmsLogisticsDetailLog.materialId = wmsAndLogistics.materialId;
                    wmsLogisticsDetailLog.quantity = wmsAndLogistics.quantity;
                    wmsLogisticsDetailLog.preparationString = wmsAndLogistics.preparationString;
                    wmsLogisticsDetailLog.workerId = wmsAndLogistics.workerId;
                    listWmsLogisticsDetailLog.Add(wmsLogisticsDetailLog);
                }

                using (ITransaction tx = YnDaoHelper.GetInstance().nHibernateHelper.GetCurrentSession().BeginTransaction())
                {
                    try
                    {
                        YnDaoHelper.GetInstance().nHibernateHelper.Save(wmsLogisticsMainLog);
                        YnDaoHelper.GetInstance().nHibernateHelper.SaveList(listWmsLogisticsDetailLog);

                        tx.Commit();//正确执行提交
                    }
                    catch (Exception ex)
                    {
                        tx.Rollback();//回滚
                        throw ex;
                    }
                }
            }
            catch (Exception ex)
            {
                YnBaseClass2.Helper.LogHelper.GetLog().Error("保存失败(Save AscmWmsLogisticsMainLog)", ex);
                throw ex;
            }
        }