private static Protocol Delete_Goods_Info(ServerInfo sinfo, Protocol pro) { GoodsHandle uh = new GoodsHandle(); Protocol returnPro = new Protocol(); if(uh.Delete_Goods_Info(sinfo, pro)) { returnPro.protoType = ProtoType.SUCCESS; } else { returnPro.protoType = ProtoType.ERROR; } return returnPro; }
private static Protocol Add_Goods(ServerInfo sinfo, Protocol pro) { GoodsHandle uh = new GoodsHandle(); Protocol returnPro = new Protocol(); if (uh.Add_Goods_Info(sinfo, pro)) { Log.WriteLog(LogLevel.MSG, sinfo.session.getName(pro.Session) + " is trying to add a goods info"); returnPro.protoType = ProtoType.SUCCESS; } else { returnPro.protoType = ProtoType.GOODS_EXISTS; } return returnPro; }
private static Protocol Get_All_Goods_Info(ServerInfo sinfo, Protocol pro) { GoodsHandle uh = new GoodsHandle(); Protocol returnPro = new Protocol(); returnPro.data = uh.Get_All_Goods_Info(sinfo,pro); if (returnPro.data!=null) { returnPro.protoType = ProtoType.SUCCESS; } else { returnPro.protoType = ProtoType.ERROR; } return returnPro; }