コード例 #1
0
    protected void OnOpenProject(object sender, EventArgs e)
    {
        // get selected file name
        Vector3D           dimCase = Vector3D.Zero;
        double             weightCase = 0.0;
        Vector3D           dimPallet = Vector3D.Zero;
        double             weightPallet = 0.0;
        double             maxPalletHeight = 0.0;
        bool               MirrorX = false, MirrorY = false;;
        bool               interlayerBottom = false, interlayerTop = false, interlayerMiddle = false;
        List <BoxPosition> boxPositions = new List <BoxPosition>();

        string filePath = DropDownListFiles.SelectedValue;

        byte[] fileContent = null;
        FtpHelpers.Download(ref fileContent, ConfigSettings.FtpDirectory, filePath, ConfigSettings.FtpUsername, ConfigSettings.FtpPassword);
        ExporterCSV_TechBSA.Import(new MemoryStream(fileContent),
                                   ref boxPositions,
                                   ref dimCase, ref weightCase,
                                   ref dimPallet, ref weightPallet,
                                   ref maxPalletHeight,
                                   ref MirrorX, ref MirrorY,
                                   ref interlayerBottom, ref interlayerTop, ref interlayerMiddle);

        DimCase                 = dimCase; WeightCase = weightCase;
        DimPallet               = dimPallet; WeightPallet = weightPallet;
        MaxPalletHeight         = maxPalletHeight;
        BoxPositions            = boxPositions;
        LayersMirrorX           = MirrorX;
        LayersMirrorY           = MirrorY;
        InterlayerBottom        = interlayerBottom;
        InterlayerTop           = interlayerTop;
        InterlayersIntermadiate = interlayerMiddle;
        FileName                = filePath;

        if (ConfigSettings.WebGLMode)
        {
            Response.Redirect("ValidationWebGL.axpx");
        }
        else
        {
            Response.Redirect("Validation.aspx");
        }
    }