public OrderRecord ToOrderRecord() { OrderRecord recordInfo = new OrderRecord(); try { recordInfo.CAPID = this.CAPData.MessageID; recordInfo.OrderedTime = this.CAPData.SentDateTime; recordInfo.RefType = this.RefType; recordInfo.RefRecordID = this.RefRecordID; recordInfo.LocationKind = this.LocationKind; if (this.Mode != null) { recordInfo.OrderMode = this.Mode.Code; } else { // [2016-03-31] 기본 발령 정보를 시험으로 생성 - by Gonzi //recordInfo.OrderMode = StatusType.Actual; recordInfo.OrderMode = StatusType.Test; } if (this.Disaster != null && this.Disaster.Kind != null && !string.IsNullOrEmpty(this.Disaster.Kind.Code)) { recordInfo.DisasterKindCode = this.Disaster.Kind.Code; } else { recordInfo.DisasterKindCode = string.Empty; } recordInfo.ClearState = new AlertingClearState(); recordInfo.ClearState.DeepCopyFrom(BasisData.AlertingClearStateInfo[this.clearAlertState]); if (this.CAPData != null) { recordInfo.CapText = this.CAPData.WriteToXML(); } else { recordInfo.CapText = string.Empty; } } catch (Exception ex) { System.Console.WriteLine("[OrderInfo] ToOrderRecord( Exception=[" + ex.ToString() + "] )"); FileLogManager.GetInstance().WriteLog("[OrderInfo] ToOrderRecord ( Exception=[" + ex.ToString() + "] )"); return(null); } return(recordInfo); }
public void DeepCopyFrom(OrderRecord src) { System.Diagnostics.Debug.Assert(src != null); this.capID = src.capID; this.orderedTime = src.orderedTime; this.orderMode = src.OrderMode; this.locationKind = src.locationKind; this.refType = src.refType; this.refRecordID = src.refRecordID; this.disasterKindCode = src.disasterKindCode; this.clearState = src.clearState; this.capText = src.capText; }