private static Protocol Delete_Depot(ServerInfo sinfo, Protocol pro) { DepotHandle uh = new DepotHandle(); Protocol returnPro = new Protocol(); if (uh.Delete_Depot_Info(sinfo,pro)) { returnPro.protoType = ProtoType.SUCCESS; } else { returnPro.protoType = ProtoType.ERROR; } return returnPro; }
private static Protocol Add_Depot(ServerInfo sinfo, Protocol pro) { DepotHandle uh = new DepotHandle(); Protocol returnPro = new Protocol(); if (uh.Add_Depot_Info(sinfo, pro)) { Log.WriteLog(LogLevel.MSG, sinfo.session.getName(pro.Session) + " is trying to add a depot info"); returnPro.protoType = ProtoType.SUCCESS; } else { returnPro.protoType = ProtoType.EXISTS; } return returnPro; }
private static Protocol Get_All_Depot(ServerInfo sinfo, Protocol pro) { DepotHandle uh = new DepotHandle(); Protocol returnPro = new Protocol(); returnPro.data = uh.Get_All_Depot_Info(sinfo, pro); if (returnPro.data!=null) { returnPro.protoType = ProtoType.SUCCESS; } else { returnPro.protoType = ProtoType.ERROR; } return returnPro; }