Exemplo n.º 1
0
    public int AutoNum(dyk.Script.Code.Variable.String str)
    {
        int res = 0;

        using (Ly.DB.Dream.SystemAutomatic.ExecutionExp st = new Ly.DB.Dream.SystemAutomatic.ExecutionExp(gszConnString)) {
            res = st.GetNewAutomatic(str.Value);
        }

        return(res);
    }
Exemplo n.º 2
0
    //执行SQL语句并返回首行的第一个值
    private string Fun_AutoNum(List <StorageUnit> list, StoragePool pool)
    {
        switch (list.Count)
        {
        case 1:
            string szArg0 = Ly.ZBox.StorageUnit.GetStringValue(list[0], pool);
            string res    = "";

            using (Ly.DB.Dream.SystemAutomatic.ExecutionExp st = new Ly.DB.Dream.SystemAutomatic.ExecutionExp(gszConnString)) {
                res = st.GetNewAutomatic(szArg0).ToString();
            }

            return(res);

        default:
            throw new Exception("参数数量不正确,未找到" + list.Count + "参数的定义。");
        }
    }