public static bool IsTenjijyo(string constructionCode)
        {
            var construction = Construction.Get(constructionCode);

            if (construction == null)
            {
                return(false);
            }

            return(construction.ConstructionKind == 4 && construction.ConstructionDetailKind == 3);
        }
Exemplo n.º 2
0
        public static bool IsBeforeProcessRequest(string constructionCode)
        {
            //長期物件区分、0:通常物件 1:長期物件(待機) 2:長期物件(再開)
            //加工依頼送信日があっても、長期物件区分が
            //「1:長期物件(待機)」の場合は、加工依頼前と同じ処理にする。
            var construction = Construction.Get(constructionCode);

            if (construction.ProlongedPlanStatus == 1)
            {
                return(true);
            }

            var schedule = ConstructionSchedule.Get(constructionCode);

            return(!schedule.SentProcessRequestDate.HasValue);
        }
        public static bool IsNewStandardQtyRule(string constructionCode)
        {
            var construction = Construction.Get(constructionCode);

            if (construction == null)
            {
                return(true);
            }

            var basedDate = Properties.Settings.Default.StandardItemSwitchingDate;

            //値なしor2016/9/1以降のときtrue
            var isNew = false;

            if (construction.ContractDate.HasValue)
            {
                isNew = basedDate <= construction.ContractDate.Value;
            }
            else
            {
                isNew = true;
            }

            var isProvisionalNew = false;

            if (construction.ProvisionalContractDate.HasValue)
            {
                isProvisionalNew = basedDate <= construction.ProvisionalContractDate.Value;
            }
            else
            {
                isProvisionalNew = true;
            }

            return(isNew && isProvisionalNew);
        }
        public static bool IsNewBunpaikiStandardQtyRule(string constructionCode)
        {
            var construction = Construction.Get(constructionCode);

            if (construction == null)
            {
                return(true);
            }

            var basedDate = new DateTime(2017, 5, 1);

            //値なしor2017/5/1以降のときtrue
            var isNew = false;

            if (construction.ContractDate.HasValue)
            {
                isNew = basedDate <= construction.ContractDate.Value;
            }
            else
            {
                isNew = true;
            }

            var isProvisionalNew = false;

            if (construction.ProvisionalContractDate.HasValue)
            {
                isProvisionalNew = basedDate <= construction.ProvisionalContractDate.Value;
            }
            else
            {
                isProvisionalNew = true;
            }

            return(isNew && isProvisionalNew);
        }