public ResponseClass AddPair(string color, string fruit) { ResponseClass resData = new ResponseClass(); try { yugensyscls objYun = new yugensyscls(); short result = objYun.AddPair(color, fruit); resData.status = result; } catch (Exception ex) { resData.status = 3; } return(resData); }
public ResponseClass GetFruit(string color) { ResponseClass resData = new ResponseClass(); try { List <Fruit> lst = new List <Fruit>(); yugensyscls objYun = new yugensyscls(); short result = objYun.GetFruit(color, ref lst); resData.status = result; resData.data = lst; } catch (Exception ex) { resData.status = 3; } return(resData); }