示例#1
0
        public static SGState SaveToDb(double[] _data, int _size, out string _ret)
        {
            _ret = null;
            if (_data == null || _size <= 0)
            {
                return(null);
            }
            MIU miu = new MIU(_size, _data);

            miu.ZeroI();
            if (miu.Img == null)
            {
                return(null);
            }
            Execute E = new Execute("Uran.AddGetSGTube");

            E.Input("@typeSize", ParAll.CTS.Name);
            E.Input("@img", miu.Img);
            E.OutputString("@group", 50);
            E.OutputDouble("@probability");
            E.OutputInt("@color");

            int ret = E.Exec();

            if (ret != 1)
            {
                _ret = ("SG::SaveGetSG: Не удалось добавить трубу");
                return(null);
            }
            return(new SGState()
            {
                Group = E.AsString("@group"), Metric = E.AsDouble("@probability"), DBColor = E.AsInt("@color")
            });
        }