Esempio n. 1
0
 /// <summary>
 ///     创建序号件拆装记录
 /// </summary>
 /// <param name="actionNo">拆装指令号</param>
 /// <param name="actionDate">拆装日期</param>
 /// <param name="actionType">拆装类型</param>
 /// <param name="reason">拆装原因</param>
 /// <param name="aircraft">飞机</param>
 /// <returns>拆装指令</returns>
 public static SnRemInstRecord CreateSnRemInstRecord(string actionNo, DateTime actionDate, ActionType actionType,
     string reason, Aircraft aircraft)
 {
     var snRemInstRecord = new SnRemInstRecord();
     snRemInstRecord.GenerateNewIdentity();
     snRemInstRecord.SetActionDate(actionDate);
     snRemInstRecord.SetActionNo(actionNo);
     snRemInstRecord.SetActionType(actionType);
     snRemInstRecord.SetReason(reason);
     snRemInstRecord.SetAircraft(aircraft);
     return snRemInstRecord;
 }
Esempio n. 2
0
 /// <summary>
 ///     创建序号件装机历史。
 /// </summary>
 /// <param name="snReg">序号件</param>
 /// <param name="pnReg">附件</param>
 /// <param name="csn">CSN,自装机以来使用循环</param>
 /// <param name="tsn">TSN,自装机以来使用小时数</param>
 /// <param name="actionType">操作类型</param>
 /// <param name="aircraft">装机所在飞机</param>
 /// <param name="actionDate">操作日期</param>
 /// <param name="remInstRecord">拆换记录</param>
 /// <param name="csn2">的基础上再累加在库时间折算的使用循环数</param>
 /// <param name="tsn2">的基础上再累加在库时间折算的使用小时数</param>
 /// <param name="status">序号件在历史节点上的状态</param>
 /// <param name="position">位置信息</param>
 /// <returns></returns>
 public static SnHistory CreateSnHistory(SnReg snReg, PnReg pnReg, int csn, decimal tsn, int csn2, decimal tsn2,
     int actionType, Aircraft aircraft, DateTime actionDate, SnRemInstRecord remInstRecord, int status,
     int position)
 {
     var snHistory = new SnHistory {CreateDate = DateTime.Now};
     snHistory.GenerateNewIdentity();
     snHistory.SetAircraft(aircraft);
     snHistory.SetActionDate(actionDate);
     snHistory.SetActionType((ActionType) actionType);
     snHistory.SetSn(snReg);
     snHistory.SetPn(pnReg);
     snHistory.SetCSN(csn);
     snHistory.SetTSN(tsn);
     snHistory.SetCSN2(csn2);
     snHistory.SetTSN2(tsn2);
     snHistory.SetSnStatus((SnStatus) status);
     snHistory.SetRemInstRecord(remInstRecord);
     snHistory.SetPosition((Position) position);
     return snHistory;
 }
Esempio n. 3
0
 /// <summary>
 ///     创建序号件拆装记录。
 /// </summary>
 /// <returns>SnRemInstRecord</returns>
 public static SnRemInstRecord CreateSnRemInstRecord()
 {
     var snRemInstRecord = new SnRemInstRecord();
     snRemInstRecord.GenerateNewIdentity();
     return snRemInstRecord;
 }
Esempio n. 4
0
 /// <summary>
 ///     设置拆换记录
 /// </summary>
 /// <param name="remInstRecord">拆换记录</param>
 public void SetRemInstRecord(SnRemInstRecord remInstRecord)
 {
     if (remInstRecord != null)
     {
         RemInstRecordId = remInstRecord.Id;
         RemInstRecord = remInstRecord;
     }
     else
     {
         if (ActionType != ActionType.非拆换)
         {
             throw new ArgumentException("拆换记录外键不能为空!");
         }
         RemInstRecordId = null;
         RemInstRecord = null;
     }
 }