public void SetOrderInfo(OrderProvisionInfo info) { if (info == null) { return; } this.currentOrderInfo = info; CheckDefaultSet(); }
public OrderPrepareEventArgs(bool executeOrder, OrderProvisionInfo order) { this.isOrder = executeOrder; this.orderProvisionInfo = order; }
private void CheckDefaultSet() { if (this.currentOrderInfo == null) { this.currentOrderInfo = new OrderProvisionInfo(); } // 발령 모드 if (this.currentOrderInfo.Mode == null) { //this.currentOrderInfo.Mode = BasisData.FindOrderModeInfoByCode(CAPLib.StatusType.Actual); this.currentOrderInfo.Mode = BasisData.FindOrderModeInfoByCode(CAPLib.StatusType.Test); } // 재난 정보 if (this.currentOrderInfo.Disaster == null) { this.currentOrderInfo.Disaster = new Disaster(); } if (this.currentOrderInfo.Disaster.Category == null) { this.currentOrderInfo.Disaster.Category = new DisasterCategory(); } if (this.currentOrderInfo.Disaster.Kind == null) { this.currentOrderInfo.Disaster.Kind = new DisasterKind(); } // 문안 정보 if (this.currentOrderInfo.MsgTextInfo == null) { this.currentOrderInfo.MsgTextInfo = new SendingMsgTextInfo(); } if (this.currentOrderInfo.MsgTextInfo.CurrentTransmitMsgText == null) { this.currentOrderInfo.MsgTextInfo.CurrentTransmitMsgText = new List <MsgText>(); } if (this.currentOrderInfo.MsgTextInfo.OriginalTransmitMsgText == null) { this.currentOrderInfo.MsgTextInfo.OriginalTransmitMsgText = new List <MsgText>(); } if (this.currentOrderInfo.MsgTextInfo.SelectedLanguages == null) { this.currentOrderInfo.MsgTextInfo.SelectedLanguages = new List <MsgTextDisplayLanguageKind>(); } if (this.currentOrderInfo.MsgTextInfo.SelectedLanguages.Count < 1) { MsgTextDisplayLanguageKind defaultLanguage = BasisData.FindMsgTextLanguageInfoByCode(BasisData.DEFAULT_LANGUAGECODE); this.currentOrderInfo.MsgTextInfo.SelectedLanguages.Add(defaultLanguage); foreach (MsgTextDisplayLanguageKind language in BasisData.MsgTextLanguageKind) { if (language.LanguageCode == BasisData.DEFAULT_LANGUAGECODE) { continue; } if (language.IsDefault) { MsgTextDisplayLanguageKind copy = new MsgTextDisplayLanguageKind(); copy.DeepCopyFrom(language); this.currentOrderInfo.MsgTextInfo.SelectedLanguages.Add(copy); } } } if (this.currentOrderInfo.MsgTextInfo.SelectedCityType == null) { this.currentOrderInfo.MsgTextInfo.SelectedCityType = new MsgTextCityType(); } // 발령 대상 if (this.currentOrderInfo.TargetRegions == null) { this.currentOrderInfo.TargetRegions = new List <DataClass.RegionDefinition>(); } if (this.currentOrderInfo.TargetSystems == null) { this.currentOrderInfo.TargetSystems = new List <SASProfile>(); } // 발령 대상 시스템 종류 if (this.currentOrderInfo.TargetSystemsKinds == null) { this.currentOrderInfo.TargetSystemsKinds = new List <SASKind>(); // 디폴트는 ALL 이므로, 오브젝트는 존재하되 카운트는 0 } // 발령지 구분 (고정값: 자체 발령) if (this.currentOrderInfo.LocationKind == OrderLocationKind.Unknown) { this.currentOrderInfo.LocationKind = OrderLocationKind.Local; } // if (this.currentOrderInfo.CAPData == null) { this.currentOrderInfo.CAPData = new CAPLib.CAP(); } }
public OrderForm(ref OrderProvisionInfo info) { InitializeComponent(); SetOrderInfo(info); }