Example #1
0
 /// <summary>
 /// 创建MaintainWork。
 /// </summary>
 ///  <returns>MaintainWork</returns>
 public static MaintainWork CreateMaintainWork()
 {
     var maintainWork = new MaintainWork
     {
     };
     maintainWork.GenerateNewIdentity();
     return maintainWork;
 }
Example #2
0
 /// <summary>
 /// 创建维修工作
 /// </summary>
 /// <param name="description">描述</param>
 /// <param name="workCode">工作代码</param>
 /// <returns></returns>
 public static MaintainWork CreateMaintainWork(string workCode, string description)
 {
     var maintainWork = new MaintainWork
     {
     };
     maintainWork.GenerateNewIdentity();
     maintainWork.SetDescription(description);
     maintainWork.SetWorkCode(workCode);
     return maintainWork;
 }
Example #3
0
 /// <summary>
 ///     创建序号件维修控制组
 /// </summary>
 /// <param name="ctrlStrategy">控制策略</param>
 /// <param name="snScope">序号范围</param>
 /// <param name="description">维修控制描述</param>
 /// <param name="ctrlDetail">维修控制明细</param>
 /// <param name="maintainWork">维修工作</param>
 /// <returns>序号件维修控制组</returns>
 public static SnMaintainCtrl CreateSnMaintainCtrl(string snScope, ControlStrategy ctrlStrategy,
     string description, string ctrlDetail, MaintainWork maintainWork)
 {
     var snMaintainCtrl = new SnMaintainCtrl();
     snMaintainCtrl.GenerateNewIdentity();
     snMaintainCtrl.SetCtrlStrategy(ctrlStrategy);
     snMaintainCtrl.SetSnScope(snScope);
     snMaintainCtrl.SetCtrlDetail(ctrlDetail);
     snMaintainCtrl.SetDescription(description);
     snMaintainCtrl.SetMaintainWork(maintainWork);
     return snMaintainCtrl;
 }
Example #4
0
 /// <summary>
 ///     创建附件维修控制组
 /// </summary>
 /// <param name="pnReg">附件</param>
 /// <param name="ctrlStrategy">控制策略</param>
 /// <param name="description">维修控制描述</param>
 /// <param name="ctrlDetail">维修控制明细</param>
 /// <param name="maintainWork">维修工作</param>
 /// <returns>附件维修控制组</returns>
 public static PnMaintainCtrl CreatePnMaintainCtrl(PnReg pnReg, ControlStrategy ctrlStrategy,
     string description, string ctrlDetail, MaintainWork maintainWork)
 {
     var pnMaintainCtrl = new PnMaintainCtrl();
     pnMaintainCtrl.GenerateNewIdentity();
     pnMaintainCtrl.SetCtrlStrategy(ctrlStrategy);
     pnMaintainCtrl.SetPnReg(pnReg);
     pnMaintainCtrl.SetCtrlDetail(ctrlDetail);
     pnMaintainCtrl.SetDescription(description);
     pnMaintainCtrl.SetMaintainWork(maintainWork);
     return pnMaintainCtrl;
 }
Example #5
0
 /// <summary>
 ///     创建项维修控制组
 /// </summary>
 /// <param name="item">附件项</param>
 /// <param name="ctrlStrategy">控制策略</param>
 /// <param name="description">维修控制描述</param>
 /// <param name="ctrlDetail">维修控制明细</param>
 /// <param name="maintainWork">维修工作</param>
 /// <returns>项维修控制组</returns>
 public static ItemMaintainCtrl CreateItemMaintainCtrl(Item item, ControlStrategy ctrlStrategy,
     string description, string ctrlDetail, MaintainWork maintainWork)
 {
     var itemMaintainCtrl = new ItemMaintainCtrl();
     itemMaintainCtrl.GenerateNewIdentity();
     itemMaintainCtrl.SetItem(item);
     itemMaintainCtrl.SetCtrlStrategy(ctrlStrategy);
     itemMaintainCtrl.SetDescription(description);
     itemMaintainCtrl.SetMaintainWork(maintainWork);
     itemMaintainCtrl.SetCtrlDetail(ctrlDetail);
     return itemMaintainCtrl;
 }
Example #6
0
 /// <summary>
 ///     设置维修工作
 /// </summary>
 /// <param name="maintainWork">维修工作</param>
 public void SetMaintainWork(MaintainWork maintainWork)
 {
     if (maintainWork == null)
     {
         MaintainWork = null;
         MaintainWorkId = null;
     }
     else
     {
         MaintainWork = maintainWork;
         MaintainWorkId = maintainWork.Id;
     }
 }