Exemplo n.º 1
0
        private void setOrderArray()
        {
            // パターン発注欄
            for (int i = 0; i < 15; i++)
            {
                orderArray[i]          = new clsSKijun();
                orderArray[i].sHinCode = Utility.NulltoStr(gcMultiRow2[i, "txtHinCode"].Value);
                orderArray[i].sSuu     = Utility.NulltoStr(gcMultiRow2[i, "txtSuu"].Value);
                orderArray[i].sGroup   = string.Empty;

                orderArray[i + 15]          = new clsSKijun();
                orderArray[i + 15].sHinCode = Utility.NulltoStr(gcMultiRow2[i, "txtHinCode2"].Value);
                orderArray[i + 15].sSuu     = Utility.NulltoStr(gcMultiRow2[i, "txtSuu2"].Value);
                orderArray[i + 15].sGroup   = string.Empty;
            }

            // 追加発注欄
            for (int i = 0; i < 5; i++)
            {
                orderArray[i + 30]          = new clsSKijun();
                orderArray[i + 30].sHinCode = Utility.NulltoStr(gcMultiRow3[i, "txtHinCode"].Value);
                orderArray[i + 30].sSuu     = Utility.NulltoStr(gcMultiRow3[i, "txtSuu"].Value);
                orderArray[i + 30].sGroup   = string.Empty;

                orderArray[i + 35]          = new clsSKijun();
                orderArray[i + 35].sHinCode = Utility.NulltoStr(gcMultiRow3[i, "txtHinCode2"].Value);
                orderArray[i + 35].sSuu     = Utility.NulltoStr(gcMultiRow3[i, "txtSuu2"].Value);
                orderArray[i + 35].sGroup   = string.Empty;
            }
        }
Exemplo n.º 2
0
        ///------------------------------------------------------------------------
        /// <summary>
        ///     商品コードから出荷基準グループを判定する </summary>
        /// <param name="sr">
        ///     NHBRDataSet.出荷基準設定Row</param>
        /// <param name="kArray">
        ///     clsSKijunクラスオブジェクト</param>
        ///------------------------------------------------------------------------
        private void getHinGroup(NHBRDataSet.出荷基準設定Row sr, ref clsSKijun kArray)
        {
            string hinCode = Utility.NulltoStr(kArray.sHinCode).PadLeft(8, '0');

            string           strSQL = "select SYO_ID, SYO_NAME, SYO_KANSAN, SYO_EXT11, SYO_EXT13 from RAKUSYO_FAXOCR.V_SYOHIN WHERE SYO_ID = '" + hinCode + "'";
            OracleCommand    Cmd    = new OracleCommand(strSQL, Conn);
            OracleDataReader dR     = Cmd.ExecuteReader();

            decimal kansan = 0;
            string  kbt    = string.Empty;
            int     dosuu  = 0;

            while (dR.Read())
            {
                kansan = 0;
                kbt    = string.Empty;
                dosuu  = 0;

                // 内容量(換算値)取得
                kansan  = (decimal)Utility.StrtoDouble(dR["SYO_KANSAN"].ToString());
                kansan *= 1000;

                // 缶・瓶・樽
                kbt = dR["SYO_EXT13"].ToString();

                // 度数
                dosuu = (int)Utility.StrtoDouble(dR["SYO_EXT11"].ToString());
            }

            dR.Dispose();
            Cmd.Dispose();


            // Aグループ
            if (kbt == global.SH_PACK_BIN)
            {
                if (kansan <= sr.小瓶条件A)
                {
                    kArray.sGroup = global.SH_GROUP_A;
                    return;
                }
            }

            // Bグループ
            if (kbt == global.SH_PACK_BIN)
            {
                if (kansan >= sr.中瓶条件1B && kansan <= sr.中瓶条件2B)
                {
                    kArray.sGroup = global.SH_GROUP_B;
                    return;
                }
            }

            // Cグループ
            if (kArray.sHinCode == sr.大瓶条件1C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件2C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件3C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件4C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件5C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件6C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件7C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件8C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件9C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件10C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件11C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件12C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件13C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件14C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件15C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件16C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件17C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件18C.PadLeft(8, '0') ||
                kArray.sHinCode == sr.大瓶条件19C.PadLeft(8, '0') || kArray.sHinCode == sr.大瓶条件20C.PadLeft(8, '0'))
            {
                kArray.sGroup = global.SH_GROUP_C;
                return;
            }

            // Dグループ
            if (kArray.sHinCode == sr.特瓶商品1D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品2D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品3D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品4D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品5D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品6D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品7D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品8D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品9D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品10D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品11D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品12D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品13D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品14D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品15D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品16D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品17D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品18D.PadLeft(8, '0') ||
                kArray.sHinCode == sr.特瓶商品19D.PadLeft(8, '0') || kArray.sHinCode == sr.特瓶商品20D.PadLeft(8, '0'))
            {
                kArray.sGroup = global.SH_GROUP_D;
                return;
            }

            // Eグループ
            if (kbt == global.SH_PACK_KAN)
            {
                if (dosuu != 0)
                {
                    kArray.sGroup = global.SH_GROUP_E;
                    return;
                }
            }

            // Fグループ
            if (kbt == global.SH_PACK_KAN)
            {
                if (dosuu == 0)
                {
                    kArray.sGroup = global.SH_GROUP_F;
                    return;
                }
            }

            // Gグループ
            if (kbt == global.SH_PACK_TARU)
            {
                kArray.sGroup = global.SH_GROUP_G;
                return;
            }
        }