示例#1
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;
 }
示例#2
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;
 }
示例#3
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;
 }
示例#4
0
 /// <summary>
 ///     设置控制策略
 /// </summary>
 /// <param name="ctrlStrategy">控制策略</param>
 public void SetCtrlStrategy(ControlStrategy ctrlStrategy)
 {
     switch (ctrlStrategy)
     {
         case ControlStrategy.先到为准:
             CtrlStrategy = ControlStrategy.先到为准;
             break;
         case ControlStrategy.后到为准:
             CtrlStrategy = ControlStrategy.后到为准;
             break;
         default:
             throw new ArgumentOutOfRangeException("ctrlStrategy");
     }
 }