/// <summary>凍結防止ソケットが必要な場合に存在していないとき警告</summary>
        public static void ValidateTouketsuBoushiSocket(List <TextObject> texts, List <Symbol> symbols)
        {
            string messageId = @"Need Touketsu Boushi. Please install same location of Boiler.";

            var validator = new Validator();

            validator.Validate = delegate()
            {
                if (Static.Drawing.Prefix != "HJA")
                {
                    return(null);
                }

                //水まわり設備=寒冷地仕様
                using (var service = new SocketPlanServiceNoTimeout())
                {
                    var siyoCode = service.GetSiyoCode(Static.ConstructionCode, Static.Drawing.PlanNo);

                    if (!service.IsKanreiArea(Static.ConstructionCode, siyoCode))
                    {
                        return(null);
                    }
                }

                var sockets = symbols.FindAll(p => p.Equipment.Name == Const.EquipmentName.防水E付_02);
                if (sockets.Count > 0)
                {
                    return(null);
                }

                return(new ErrorDialog(messageId, 0));
            };

            validator.Run(messageId);
        }
Esempio n. 2
0
 //工事コードで決まる情報の取得(増えてきたのでまとめた)
 private void GetConstructionInfomations(string constructionCode, string planNo)
 {
     using (var service = new SocketPlanServiceNoTimeout())
     {
         Static.IsBeforeKakouIrai    = service.IsBeforeProcessRequest(constructionCode);
         Static.IsTenjijyo           = service.IsTenjijyoConstruction(constructionCode);
         Static.Schedule             = service.GetSchedule(constructionCode);
         Static.ConstructionTypeCode = service.GetConstructionTypeCode(constructionCode, Utilities.ConvertPlanNo(planNo));
     }
 }
        private void LoadComboItems()
        {
            var items = new List <PartsColor>();

            using (var service = new SocketPlanServiceNoTimeout())
            {
                items.AddRange(service.GetPartsColors());
            }

            items.RemoveAll(p => p.Name.Contains("電"));

            this.wallColumn.DataSource    = items;
            this.wallColumn.ValueMember   = "Id";
            this.wallColumn.DisplayMember = "NameWithPrefix";
        }
        private void approveButton_Click(object sender, EventArgs e)
        {
            try
            {
                bool isValidated;

                if (this.NeedMessage)
                {
                    if (string.IsNullOrEmpty(this.Message))
                    {
                        throw new ApplicationException("To Developer,\nApprovalControlのMessageを設定してください。");
                    }

                    if (string.IsNullOrEmpty(this.MessageId))
                    {
                        throw new ApplicationException("To Developer,\nApprovalControlのMessageIdを設定してください。");
                    }

                    using (var service = new SocketPlanServiceNoTimeout())
                    {
                        isValidated = service.ValidateUser(this.idText.Text, this.pwText.Text, Environment.MachineName, this.Message);
                    }
                }
                else
                {
                    using (var service = new SocketPlanServiceNoTimeout())
                    {
                        isValidated = service.ValidateUserWithoutMessage(this.idText.Text, this.pwText.Text, true);
                    }
                }

                if (isValidated)
                {
                    this.Approved(sender, e);
                }
                else
                {
                    this.Denied(sender, e);
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowError(ex);
            }
        }
        /// <summary>凍結防止ソケットとボイラーの数が合わない場合警告</summary>
        public static void WarnTouketsuBoushiSocket(List <TextObject> texts, List <Symbol> symbols)
        {
            string messageId = @"REMINDER: INSTALL SAME NUMBER OF TOUEKTSU BOUSHI WITH BOILER.";

            var validator = new Validator();

            validator.Validate = delegate()
            {
                if (Static.Drawing.Prefix != "HJA")
                {
                    return(null);
                }

                //水まわり設備=寒冷地仕様
                using (var service = new SocketPlanServiceNoTimeout())
                {
                    var siyoCode = service.GetSiyoCode(Static.ConstructionCode, Static.Drawing.PlanNo);

                    if (!service.IsKanreiArea(Static.ConstructionCode, siyoCode))
                    {
                        return(null);
                    }
                }

                var sockets = symbols.FindAll(p => p.Equipment.Name == Const.EquipmentName.防水E付_02);
                if (sockets.Count == 0)
                {
                    return(new ErrorDialog(messageId, 0));
                }

                var boilers = texts.FindAll(p => p.Text.Contains(Const.Text.ガスボイラー) ||
                                            p.Text.Contains(Const.Text.電気温水器) ||
                                            p.Text.Contains(Const.Text.エコキュート));

                if (sockets.Count == boilers.Count)
                {
                    return(null);
                }

                return(new ErrorDialog(messageId, 0));
            };

            validator.Run(messageId);
        }
        //加工依頼後で、回路図面が存在しない場合警告
        public static void WarnNotExistsKairoFrame(List <Drawing> drawings)
        {
            var messageId = @"There is no 提案HEMS回路図面. Please create a 提案HEMS回路図面 before do the option picking.";
            var validator = new Validator();

            validator.Validate = delegate()
            {
                //加工依頼前はノーチェック
                using (var server = new SocketPlanServiceNoTimeout())
                {
                    if (server.IsBeforeProcessRequest(Static.ConstructionCode))
                    {
                        return(null);
                    }
                }

                var error = new ErrorDialog(messageId, 0);

                //回路図面が見つからなかったらエラー
                var kairoLayoutName = "提案HEMS回路図面";
                foreach (var drawing in drawings)
                {
                    if (drawing.Floor < 1 || drawing.Floor > 3)
                    {
                        continue;
                    }

                    WindowController2.BringDrawingToTop(drawing.WindowHandle);
                    AutoCad.Command.SetCurrentLayoutToModel();
                    var modelLayout = AutoCad.Db.Layout.GetCurrent();
                    AutoCad.Command.SetCurrentLayout(kairoLayoutName);
                    var kairoLayout = AutoCad.Db.Layout.GetCurrent();
                    if (modelLayout == kairoLayout)
                    {
                        return(error);
                    }
                }
                return(null);
            };

            validator.Run(messageId);
        }
        public static void Initialize(string constructionCode)
        {
            using (var service = new SocketPlanServiceNoTimeout())
            {
                convertionSerials    = new List <ConvertionLightSerial>(service.GetConvertionLightSerials(constructionCode));
                switchLights         = new List <SwitchLightSerial>(service.GetSwitchLightSerials());
                usableSerials        = new List <UsableRohmOfLightSerial>(service.GetUsableRohmOfLightSerial(constructionCode));
                isUsingIrisLight     = service.IsUsingIrisohyamaLightConstructions(constructionCode);
                usableBracketSerials = new List <UsableBracketLightSerial>(service.GetUsableBracketLightSerials(Static.ConstructionCode));
            }

            if (Static.Schedule != null)
            {
                releaseDate = Static.Schedule.ExpectedReleaseDate;
            }
            else
            {
                releaseDate = null;
            }

            checkedConstructionCode = constructionCode;
        }
Esempio n. 8
0
        public static List <RoomObject> GetAll(int floor)
        {
            var list = new List <RoomObject>();

            List <SiyoHeya> siyoHeyas;

            using (var service = new SocketPlanServiceNoTimeout())
            {
                siyoHeyas = new List <SiyoHeya>(service.GetSiyoHeyas(Static.ConstructionCode, Static.Drawing.PlanNoWithHyphen));
            }

            var ids = Filters.GetRoomOutlineIds();

            foreach (var id in ids)
            {
                if (AutoCad.Db.Polyline.GetVertex(id).Count < 4)
                {
                    continue; //頂点が4つ以上ないと空間は表せない。4つ未満の線は無視する。線が閉じている時はありえるのか。ま、いいや。
                }
                list.Add(new RoomObject(id, floor, siyoHeyas));
            }

            return(list);
        }
Esempio n. 9
0
        private void LoadSpecs(string planNo)
        {
            var specs = new HouseSpecs();

            List <Setting> settings;

            using (var service = new SocketPlanServiceNoTimeout())
            {
                var siyoCode = service.GetSiyoCode(Static.ConstructionCode, Utilities.ConvertPlanNo(planNo));
                settings         = new List <Setting>(service.GetSettings(Static.ConstructionCode, siyoCode));
                specs.Kanabakari = service.GetKanabakari(Static.ConstructionCode, siyoCode);
                if (specs.Kanabakari == Const.Kanabakari._240)
                {
                    specs.CeilingHeight_1F = Const.CeilingHeight._2400;
                    specs.CeilingHeight_2F = Const.CeilingHeight._2400;
                }
                else if (specs.Kanabakari == Const.Kanabakari._260)
                {
                    specs.CeilingHeight_1F = Const.CeilingHeight._2600;
                    specs.CeilingHeight_2F = Const.CeilingHeight._2400;
                }
                else if (specs.Kanabakari == Const.Kanabakari._265)
                {
                    specs.CeilingHeight_1F = Const.CeilingHeight._2650;
                    specs.CeilingHeight_2F = Const.CeilingHeight._2500;
                }
                else
                {
                    throw new ApplicationException(Messages.InvalidKanabakari(Static.HouseSpecs.Kanabakari));
                }


                specs.HouseTypeCode = service.GetHouseTypeCode(Static.ConstructionCode, Utilities.ConvertPlanNo(planNo));
                var gropuDetail = service.GetHouseTypeGroupDetail(Static.ConstructionTypeCode);
                if (gropuDetail != null)
                {
                    specs.HouseTypeGroupId = gropuDetail.HouseTypeGroupId;
                }
                else
                {
                    specs.HouseTypeGroupId = 0;
                }

                if (!Static.IsBeforeKakouIrai)
                { //加工依頼後だったら、太陽光関連の情報を取得する。
                    //加工依頼前は、特に使わないので、デフォ値で問題なし。
                    specs.ExistSolar            = service.ExistSolar(Static.ConstructionCode);
                    specs.PowerConditionerCount = service.GetPowerConditionerCount(Static.ConstructionCode);
                }
            }

            specs.ExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 1).Value);
            specs.CeilingReceiverExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 2).Value);
            specs.CeilingDepth1F             = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 3).Value);
            specs.CeilingDepth2F             = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 4).Value);
            specs.CeilingThickness1F         = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 5).Value);
            specs.CeilingThickness2F         = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 6).Value);
            specs.FloorThickness             = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 7).Value);
            specs.ConnectorMaleExtraLength   = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 8).Value);
            specs.ConnectorFemaleExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 9).Value);
            specs.JBExtraLength                    = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 10).Value);
            specs.BreakerExtraLength               = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 11).Value);
            specs.TerminalExtraLength              = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 12).Value);
            specs.DownLightExtraLength             = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 13).Value);
            specs.SolarSocketExtraLength           = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 15).Value);
            specs.PowerConExtraLength              = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 16).Value);
            specs.ConnectorHaikanMaleExtraLength   = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 17).Value);
            specs.ConnectorHaikanFemaleExtraLength = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 18).Value);
            specs.HaikanTakeOutExtraLength         = Convert.ToDecimal(settings.Find(p => p.SettingKindId == 19).Value);

            Static.HouseSpecs = specs;
        }
Esempio n. 10
0
        public static void DrawRoomOutline(bool isPolyline, bool withJo)
        {
            WindowController2.BringAutoCadToTop();
            AutoCad.Command.Prepare();
            AutoCad.Command.SetCurrentLayoutToModel();

            if (withJo)
            {
                AutoCad.Db.LayerTableRecord.Make(Const.Layer.電気_部屋_WithJyou, CadColor.Magenta, Const.LineWeight._0_70);
                AutoCad.Command.SetCurrentLayer(Const.Layer.電気_部屋_WithJyou);
            }
            else
            {
                AutoCad.Db.LayerTableRecord.Make(Const.Layer.電気_部屋_WithoutJyou, CadColor.Green, Const.LineWeight._0_70);
                AutoCad.Command.SetCurrentLayer(Const.Layer.電気_部屋_WithoutJyou);
            }

            List <SiyoHeya> siyoHeyas;

            using (var service = new SocketPlanServiceNoTimeout())
            {
                siyoHeyas = new List <SiyoHeya>(service.GetSiyoHeyas(Static.ConstructionCode, Static.Drawing.PlanNoWithHyphen));
            }

            var drawing = Drawing.GetCurrent();

            while (true)
            {
                //部屋名を選択してもらう。
                var roomName = RoomObject.GetRoomNameText("Select Room Name:", false);
                if (string.IsNullOrEmpty(roomName))
                {
                    break; //入力をキャンセルしていたら終了
                }
                if (!withJo && UnitWiring.Masters.Rooms.Exists(p => p.Name == roomName && p.WithJyou))
                {
                    MessageDialog.ShowWarning(Messages.ShouldHaveJyou()); //警告のみで処理続行
                }
                var roomNameInSiyo = RoomObject.GetRoomNameInSiyo(roomName, siyoHeyas);
                if (string.IsNullOrEmpty(roomNameInSiyo))
                {
                    RoomSelectForm form = new RoomSelectForm(siyoHeyas, roomName);
                    var            dr   = form.ShowDialog();
                    if (dr == System.Windows.Forms.DialogResult.Cancel)
                    {
                        break;
                    }

                    roomName = form.CorrectRoomName;
                }

                var roomCode = RoomObject.GetRoomCode(roomName, drawing.Floor, siyoHeyas);

                DrawResult result;

                //線を引いてもらう。
                if (isPolyline)
                {
                    result = AutoCad.Drawer.DrawPolyline(true);
                }
                else
                {
                    result = AutoCad.Drawer.DrawRectangle("");
                }

                if (result.Status == DrawStatus.Canceled)
                {
                    break;
                }

                if (result.Status == DrawStatus.Failed)
                {
                    throw new ApplicationException(Messages.RoomNotSet());
                }

                var lineId = result.ObjectId;

                if (!AutoCad.Db.Entity.GetLayerName(lineId).Contains(Const.Layer.電気_部屋))
                {
                    throw new ApplicationException(Messages.RoomNotSet());
                }

                //線の始点と終点をくっつける
                if (!AutoCad.Db.Polyline.IsClosed(lineId))
                {
                    AutoCad.Db.Polyline.SetClose2(lineId);
                }

                //帖数を選択してもらう。
                string jo = string.Empty;
                if (withJo)
                {
                    jo = RoomObject.SelectJoIndication();

                    if (string.IsNullOrEmpty(jo))
                    {
                        AutoCad.Db.Object.Erase(lineId);
                        AutoCad.Command.Refresh();
                        break; //入力をキャンセルしていたら書いた図形を削除して終了
                    }
                }

                //引いた線に部屋名を拡張データとして持たせる。
                XData.Room.SetRoomName(lineId, roomName);
                XData.Room.SetRoomCode(lineId, roomCode);

                if (withJo)
                {
                    XData.Room.SetRoomJyou(lineId, jo);
                }

                //タレ壁情報を入力する画面を表示する
                var roomObj      = new RoomObject(lineId, 0, siyoHeyas); //階数は適当
                var roomInfoForm = new RoomInfoForm(roomObj);
                var dr2          = roomInfoForm.ShowDialog();
                if (dr2 == System.Windows.Forms.DialogResult.Cancel)
                {
                    AutoCad.Db.Object.Erase(lineId);
                    AutoCad.Command.Refresh();
                    break; //入力をキャンセルしていたら書いた図形を削除して終了
                }

                AutoCad.Status.WaitFinish();

                if (result.Status == DrawStatus.DrawnAndCanceled)
                {
                    break; //線をひいてキャンセルしていたら拡張データを設定して終了
                }
            }
        }
Esempio n. 11
0
        public static DrawResult DrawRoomOutline0Jyou(int floor)
        {
            WindowController2.BringAutoCadToTop();
            AutoCad.Command.Prepare();
            AutoCad.Command.SetCurrentLayoutToModel();

            AutoCad.Db.LayerTableRecord.Make(Const.Layer.電気_部屋_WithoutJyou, CadColor.Green, Const.LineWeight._0_70);
            AutoCad.Command.SetCurrentLayer(Const.Layer.電気_部屋_WithoutJyou);

            List <SiyoHeya> siyoHeyas;

            using (var service = new SocketPlanServiceNoTimeout())
            {
                siyoHeyas = new List <SiyoHeya>(service.GetSiyoHeyas(Static.ConstructionCode, Static.Drawing.PlanNoWithHyphen));
            }

            //先に線を引いてもらう
            var result = AutoCad.Drawer.DrawPolyline(true);

            if (result.Status == DrawStatus.Canceled)
            {
                return(result);
            }

            if (result.Status == DrawStatus.Failed)
            {
                throw new ApplicationException("Failed to get line info.\nPlease draw line again.");
            }

            var lineId = result.ObjectId;

            if (!AutoCad.Db.Entity.GetLayerName(lineId).Contains(Const.Layer.電気_部屋))
            {
                throw new ApplicationException("Invalid layer.\nPlease draw line again.");
            }

            //線の始点と終点をくっつける
            if (!AutoCad.Db.Polyline.IsClosed(lineId))
            {
                AutoCad.Db.Polyline.SetClose2(lineId);
            }

            //部屋を選んでもらう
            var roomName = RoomObject.GetRoomNameText("Select Room Name:", true);

            if (roomName == null)
            {
                result.Status = DrawStatus.Canceled;
                AutoCad.Db.Polyline.Erase(lineId);
                return(result);
            }
            else if (roomName == string.Empty)
            {
                roomName = "外部";
            }

            var roomNameInSiyo = RoomObject.GetRoomNameInSiyo(roomName, siyoHeyas);
            var roomCode       = RoomObject.GetRoomCode(roomName, floor, siyoHeyas);

            if (string.IsNullOrEmpty(roomNameInSiyo))
            {
                RoomSelectForm form = new RoomSelectForm(siyoHeyas, roomName);
                var            dr   = form.ShowDialog();
                if (dr == System.Windows.Forms.DialogResult.Cancel)
                {
                    result.Status = DrawStatus.Canceled;
                    AutoCad.Db.Polyline.Erase(lineId);
                    return(result);
                }

                roomName = form.CorrectRoomName;
                roomCode = form.CorrectRoomCode;
            }

            XData.Room.SetRoomName(lineId, roomName);
            XData.Room.SetRoomJyou(lineId, "0");
            XData.Room.SetRoomTarekabeJyou(lineId, "0");
            XData.Room.SetRoomCode(lineId, roomCode);

            return(result);
        }
Esempio n. 12
0
        /// <summary>
        /// 登録されている数量と図面上の数量が一致しなかったらエラー
        /// </summary>
        /// <param name="lights">照明情報</param>
        /// <param name="emptyLightSerials">在庫が空である照明品番情報</param>
        /// <param name="usableLightSerials">使用可能な照明品番情報</param>
        public static void ValidateLightSerialCountNotMatch(List <Symbol> symbols)
        {
            string messageId =
                @"The count of light serial and stocked light serial does not match.
Please inquire of SMD.";

            var validator = new Validator();

            validator.Validate = delegate()
            {
                List <Symbol> lightSymbols = symbols.FindAll(p => p.IsLight);

                if (lightSymbols.Count == 0)
                {
                    return(null);
                }

                //在庫無しの品番情報
                List <LightSerial> emptyStockLightSerials;
                //邸ごとの使用できる品番情報
                List <UsableLightSerial> usableLightSerials;
                using (var service = new SocketPlanServiceNoTimeout())
                {
                    emptyStockLightSerials = new List <LightSerial>(service.GetEmptyStockLightSerials());
                    usableLightSerials     = new List <UsableLightSerial>(service.GetUsableLightSerials(Static.ConstructionCode));
                }

                if (emptyStockLightSerials.Count == 0)
                {
                    return(null);
                }

                List <Light> lights = new List <Light>();
                lightSymbols.ForEach(p => lights.Add(new Light(p)));

                //在庫数が一致しなかった照明シンボルを設定するリスト
                List <Symbol> notMatchLightSymbols = new List <Symbol>();
                //在庫数が一致しなかった品番名を設定するリスト
                List <String> notMatchLightHinbanNames = new List <string>();

                foreach (LightSerial emptyLightSerial in emptyStockLightSerials)
                {
                    UsableLightSerial usableLightSerial = usableLightSerials.Find(p => p.LightSerial == emptyLightSerial.Name);

                    if (usableLightSerial == null)//在庫数情報が取れなかった場合は在庫比較の判断ができない為。
                    {
                        continue;
                    }

                    List <Light> stockEmptyLights          = new List <Light>();
                    int          totalStockEmptyLightCount = 0;

                    //図面内に存在する在庫無し品番をカウント
                    foreach (Light light in lights)
                    {
                        List <string> hinbans = light.GetSerialsForCount();
                        int           count   = hinbans.FindAll(p => p == emptyLightSerial.Name).Count;
                        if (count == 0)
                        {
                            continue;
                        }

                        stockEmptyLights.Add(light);
                        totalStockEmptyLightCount += count;
                    }

                    if (totalStockEmptyLightCount == usableLightSerial.UsableCount)
                    {
                        continue;
                    }

                    //図面上と登録されている拾い数量が一致してなければエラーを表示
                    foreach (var light in stockEmptyLights)
                    {
                        if (notMatchLightSymbols.IndexOf(light.Symbol) == -1)
                        {
                            notMatchLightSymbols.Add(light.Symbol);
                        }
                    }

                    string infoMessage = emptyLightSerial.Name + " count " + totalStockEmptyLightCount + ", stock count " + usableLightSerial.UsableCount;;
                    notMatchLightHinbanNames.Add(infoMessage);
                }

                if (notMatchLightSymbols.Count == 0 && notMatchLightHinbanNames.Count == 0)
                {
                    return(null);
                }

                var error = new ErrorDialog(messageId, false);

                notMatchLightSymbols.ForEach(a => error.AddInfo(a));
                notMatchLightHinbanNames.ForEach(a => error.AddInfo(a));


                return(error);
            };

            validator.Run(messageId);
        }
Esempio n. 13
0
        /// <summary>
        /// 在庫のない照明を使用してたらエラー
        /// </summary>
        /// <param name="constractionCode">工事コード</param>
        /// <param name="symbols">シンボル群</param>
        public static void ValidateLightSerialOutOfStock(List <Symbol> symbols)
        {
            string messageId =
                @"Light serial of out of stock is used.
Please check light serial.";

            var validator = new Validator();

            validator.Validate = delegate()
            {
                List <Symbol> lightSymbols = symbols.FindAll(p => p.IsLight);
                if (lightSymbols.Count == 0)
                {
                    return(null);
                }

                //在庫無しの品番情報
                List <LightSerial> emptyStockLightSerials;
                //邸ごとの使用できる品番情報
                List <UsableLightSerial> usableLightSerials;
                //加工前依頼か否か
                bool isBeforeProcessRequest;
                using (var service = new SocketPlanServiceNoTimeout())
                {
                    emptyStockLightSerials = new List <LightSerial>(service.GetEmptyStockLightSerials());
                    usableLightSerials     = new List <UsableLightSerial>(service.GetUsableLightSerials(Static.ConstructionCode));
                    isBeforeProcessRequest = service.IsBeforeProcessRequest(Static.ConstructionCode);
                }

                //非許可の照明品番が設定されていた照明シンボルを設定するリスト
                List <Symbol> denialLightSymbols = new List <Symbol>();
                //非許可の品番名を設定するリスト
                List <String> deniialLightHinbanName = new List <string>();

                List <Light> lights = new List <Light>();
                lightSymbols.ForEach(p => lights.Add(new Light(p)));

                foreach (Light light in lights)
                {
                    List <string> hinbans = light.GetSerialsForDistinct();
                    foreach (string hinban in hinbans)
                    {
                        if (!emptyStockLightSerials.Exists(p => p.Name == hinban))
                        {
                            continue;
                        }

                        if (IsUsableHinban(hinban, isBeforeProcessRequest, usableLightSerials))
                        {
                            continue;
                        }

                        if (denialLightSymbols.IndexOf(light.Symbol) == -1)
                        {
                            denialLightSymbols.Add(light.Symbol);
                        }

                        if (deniialLightHinbanName.IndexOf(hinban) == -1)
                        {
                            deniialLightHinbanName.Add(hinban);
                        }
                    }
                }

                if (denialLightSymbols.Count == 0 && deniialLightHinbanName.Count == 0)
                {
                    return(null);
                }

                var error = new ErrorDialog(messageId, false);
                denialLightSymbols.ForEach(a => error.AddInfo(a));
                deniialLightHinbanName.ForEach(a => error.AddInfo(a + " out of stock."));
                return(error);
            };

            validator.Run(messageId);
        }