public async Task <string> getEmployeeDataByEmail(string societyIdEmail)
        {
            string [] id = societyIdEmail.Split(",");
            if (id != null)
            {
                if (!id[0].Equals("") && id[1].Equals(""))
                {
                    var EmployeeData = await context.retrieveAll(id[0]);

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

                    if (EmployeeData == null)
                    {
                        return(null);
                    }
                    return(JsonConvert.SerializeObject(EmployeeData));
                }
                return("send like this : societyId,EmployeeEmail");
            }
            return("null parameter");
        }
예제 #2
0
        public async Task <string> getEmployeeData(string societyId)
        {
            var EmployeeData = await context.retrieveAll(societyId);

            if (EmployeeData == null)
            {
                return(null);
            }
            return(JsonConvert.SerializeObject(EmployeeData));
        }