public async Task <string> getVehicleData(string vid, string societyId)
        {
            var VehicleData = await context.retrieve(vid);

            if (VehicleData == null)
            {
                return(null);
            }
            return(JsonConvert.SerializeObject(VehicleData));
        }
        public async Task <string> getAllVehichleData(string societyId)
        {
            var SocietyData = await context.retrieve(societyId);

            if (SocietyData == null)
            {
                return(null);
            }
            return(JsonConvert.SerializeObject(SocietyData));
        }
Example #3
0
        public async Task <string> getAllVehichleData(string societyIdVtypeEmail)
        {
            string [] id = societyIdVtypeEmail.Split(",");
            if (id != null)
            {
                if (!id[0].Equals("") && id[1].Equals("") && !id[2].Equals(""))
                {
                    var SocietyData = await context.retrieveByEmail(id[0], id[2]);

                    if (SocietyData == null)
                    {
                        return(null);
                    }
                    return(JsonConvert.SerializeObject(SocietyData));
                }
                if (!id[0].Equals("") && !id[1].Equals("") && id[2].Equals(""))
                {
                    var SocietyData = await context.retrieveByType(id[0], id[1]);

                    if (SocietyData == null)
                    {
                        return(null);
                    }
                    return(JsonConvert.SerializeObject(SocietyData));
                }
                if (!id[0].Equals("") && id[1].Equals("") && id[2].Equals(""))
                {
                    var SocietyData = await context.retrieve(id[0]);

                    if (SocietyData == null)
                    {
                        return(null);
                    }
                    return(JsonConvert.SerializeObject(SocietyData));
                }
            }
            return("parameter is null");
        }