/// <summary> /// 返回 此Prj_Network下的Unit /// </summary> /// <returns></returns> public virtual Prj_Unit New_Prj_Unit() { Prj_Unit result = new Prj_Unit(); result.Prj_Network_ID = this.ID; return(result); }
/// <summary> /// 返回 此Prj_Network下的Unit /// </summary> /// <returns></returns> public virtual Prj_Unit New_Prj_Unit() { Prj_Unit result = new Prj_Unit(); result.Prj_Network_ID = this.ID; result.Prj_Network = this; this.Prj_Unit_List.Add(result); return result; }
/// <summary> /// 根据ID获得Cld_FCBlock /// </summary> /// <param name="condition">ID type:int</param> /// <returns></returns> public Prj_Unit GetPrj_Unit_By_ID(int condition) { using (ITransaction transaction = session.BeginTransaction()){ try{ Prj_Unit result = this.session.Get <Prj_Unit>(condition); transaction.Commit(); return(result); }catch (Exception e) { transaction.Rollback(); throw e; } } }
public virtual bool Compare(Prj_Unit unit) { if (this.ID != unit.ID) { throw new Exception("id should be equla"); } if (this.UnitAddress != unit.UnitAddress || this.UnitName != unit.UnitName || this.NetworkAddress != unit.NetworkAddress || this.Description != unit.Description || this.Prj_Network_ID != unit.Prj_Network_ID ) { return false; } else { return true; } }
public virtual bool Compare(Prj_Unit unit) { if (this.ID != unit.ID) { throw new Exception("id should be equla"); } if (this.UnitAddress != unit.UnitAddress || this.UnitName != unit.UnitName || this.NetworkAddress != unit.NetworkAddress || this.Description != unit.Description || this.Prj_Network_ID != unit.Prj_Network_ID ) { return(false); } else { return(true); } }
/// <summary> /// 默认构造函数 /// <summary> public Prj_Controller() : base() { m_ID = -1; m_Cld_Constant_List = null; m_Cld_FCBlock_List = null; m_Cld_FCInput_List = null; m_Cld_FCOutput_List = null; m_Cld_FCParameter_List = null; m_Cld_Graphic_List = null; m_Cld_Signal_List = null; m_Prj_Document_List = null; m_Prj_Sheet_List = null; m_ControllerAddress = String.Empty; m_ControllerName = String.Empty; m_CreateTime = DateTime.MinValue; m_ModifyTime = DateTime.MinValue; m_Description = String.Empty; m_Version = String.Empty; m_TranslatorResult = String.Empty; m_Prj_Unit_ID = -1; m_Prj_Unit = null; m_Sequence = -1; }
/// <summary> /// 将给定的Prj_Unit和当前的Network关联起来 /// </summary> /// <param name="to_add"></param> public virtual void Add(Prj_Unit to_add) { this.Prj_Unit_List.Add(to_add); to_add.Prj_Network_ID = this.ID; to_add.Prj_Network = this; }
/// <summary> /// 将给定的Prj_Unit和当前的Network关联起来 /// </summary> /// <param name="to_add"></param> public virtual void Add(Prj_Unit to_add) { this.Prj_Unit_List.Add(to_add); to_add.Prj_Network_ID = this.ID; }
/// <summary> /// 返回 此Prj_Network下的Unit /// </summary> /// <returns></returns> public virtual Prj_Unit New_Prj_Unit() { Prj_Unit result = new Prj_Unit(); result.Prj_Network_ID = this.ID; return result; }
/// <summary> /// 默认构造函数 /// <summary> public Prj_Controller():base(){ m_ID = -1; m_Cld_Constant_List = null; m_Cld_FCBlock_List = null; m_Cld_FCInput_List = null; m_Cld_FCOutput_List = null; m_Cld_FCParameter_List = null; m_Cld_Graphic_List = null; m_Cld_Signal_List = null; m_Prj_Document_List = null; m_Prj_Sheet_List = null; m_ControllerAddress = String.Empty; m_ControllerName = String.Empty; m_CreateTime = DateTime.MinValue; m_ModifyTime = DateTime.MinValue; m_Description = String.Empty; m_Version = String.Empty; m_TranslatorResult = String.Empty; m_Prj_Unit_ID = -1; m_Prj_Unit = null; m_Sequence = -1; }