public static function deleteBusiness_product($obj_mainpacket) { $packet = $obj_mainpacket->packet; $ProductId = $packet[0]; $msg = "failed"; $result = 0; $result_ProductId = 0; $retResult = BL_manageBusiness_product::getBusiness_productListByProductId($ProductId); if ($retResult->type == 1) { $obj_Business_product = $retResult->data[0]; $obj_result2 = DAL_manageBusiness_product::deleteBusiness_product($obj_Business_product->ProductId); if ($obj_result2->type == 1) { $result = 1; $result_ProductId = $obj_Business_product->ProductId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this Business_product"; } } else { $msg = "Sorry!!! The Business_product you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_Business_product->ProductId, $msg); $obj_mainpacket->main_setPacket(); }