Exemplo n.º 1
0
    private int Get_User_Only_Car(DBCRMTree db, long au_code)
    {
        string sql = "select top 1 CI_Code from CT_Car_Inventory where CI_AU_Code=@0;";

        dynamic car  = db.Query <dynamic>(sql, au_code);
        dynamic _car = JsonConvert.DeserializeObject <dynamic>(JsonConvert.SerializeObject(car));
        string  _CI  = JsonConvert.SerializeObject(_car[0].CI_Code);

        return(Convert.ToInt32(_CI));
    }