當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vendor類代碼示例

本文整理匯總了PHP中Vendor的典型用法代碼示例。如果您正苦於以下問題:PHP Vendor類的具體用法?PHP Vendor怎麽用?PHP Vendor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Vendor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $vendorId = null;
     $contactName = "Trevor Rigler";
     $vendorEmail = "trier@cnm.edu";
     $vendorName = "TruFork";
     $vendorPhoneNumber = "5053594687";
     $vendor = new Vendor($vendorId, $contactName, $vendorEmail, $vendorName, $vendorPhoneNumber);
     $vendor->insert($this->getPDO());
     $productId = null;
     $vendorId = $vendor->getVendorId();
     $description = "A glorius bead to use";
     $leadTime = 10;
     $sku = "TGT354";
     $title = "Bead-Green-Blue-Circular";
     $this->product = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
     $this->product->insert($this->getPDO());
     $alertId = null;
     $alertCode = "WM";
     $alertFrequency = "D2";
     $alertOperator = "L";
     $alertPoint = 100.514;
     $this->alertLevel = new AlertLevel($alertId, $alertCode, $alertFrequency, $alertPoint, $alertOperator);
     $this->alertLevel->insert($this->getPDO());
 }
開發者ID:sandidgec,項目名稱:foodinventory,代碼行數:26,代碼來源:product-alert-test.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     $vendorId = null;
     $contactName = "Trevor Rigler";
     $vendorEmail = "trier@cnm.edu";
     $vendorName = "TruFork";
     $vendorPhoneNumber = "5053594687";
     $vendor = new Vendor($vendorId, $contactName, $vendorEmail, $vendorName, $vendorPhoneNumber);
     $vendor->insert($this->getPDO());
     $productId = null;
     $vendorId = $vendor->getVendorId();
     $description = "A glorius bead to use";
     $leadTime = 10;
     $sku = "TGT354";
     $title = "Bead-Green-Blue-Circular";
     $this->product = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
     $this->product->insert($this->getPDO());
     $locationId = null;
     $description = "Back Stock";
     $storageCode = 7;
     $this->location = new Location($locationId, $storageCode, $description);
     $this->location->insert($this->getPDO());
     $unitId = null;
     $unitCode = "pk";
     $quantity = 10.5;
     $this->unitOfMeasure = new UnitOfMeasure($unitId, $unitCode, $quantity);
     $this->unitOfMeasure->insert($this->getPDO());
 }
開發者ID:sandidgec,項目名稱:foodinventory,代碼行數:29,代碼來源:product-location-test.php

示例3: setUp

 /**
  * Set up to create vendor, product, unitOfMeasure objects
  *
  **/
 public function setUp()
 {
     parent::setUp();
     $this->guzzle = new \GuzzleHttp\Client(['cookies' => true]);
     $vendorId = null;
     $contactName = "Trevor Rigler";
     $vendorEmail = "trier@cnm.edu";
     $vendorName = "TruFork";
     $vendorPhoneNumber = "5053594687";
     $vendor = new Vendor($vendorId, $contactName, $vendorEmail, $vendorName, $vendorPhoneNumber);
     $vendor->insert($this->getPDO());
     $productId = null;
     $vendorId = $vendor->getVendorId();
     $description = "A glorius bead to use";
     $leadTime = 10;
     $sku = "TGT354";
     $title = "Bead-Green-Blue-Circular";
     $this->product = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
     $this->product->insert($this->getPDO());
     $unitId = null;
     $quantity = 3.5;
     $unitCode = "ea";
     $this->unitOfMeasure = new UnitOfMeasure($unitId, $unitCode, $quantity);
     $this->unitOfMeasure->insert($this->getPDO());
 }
開發者ID:sandidgec,項目名稱:foodinventory,代碼行數:29,代碼來源:location-api-test.php

示例4: destroy

 public static function destroy($id)
 {
     self::check_logged_in();
     $vendor = new Vendor(array('id' => $id));
     $vendor->destroy();
     Redirect::to('/vendors', array('message' => 'The vendor has been removed successfully!'));
 }
開發者ID:jackrl,項目名稱:Tsoha-Bootstrap,代碼行數:7,代碼來源:vendors_controller.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     $vendorId = null;
     $name = "TruFork";
     $contactName = "Trevor Rigler";
     $email = "trier@cnm.edu";
     $phoneNumber = "5053594687";
     $vendor = new Vendor($vendorId, $name, $contactName, $email, $phoneNumber);
     $vendor->insert($this->getPDO());
     $productId = null;
     $vendorId = $vendor->getVendorId();
     $description = "A glorius bracelet for any occasion to use";
     $leadTime = 15;
     $sku = "457847";
     $title = "Bracelet-Green-Blue";
     $this->finishedProduct = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
     $this->finishedProduct->insert($this->getPDO());
     $productId = null;
     $vendorId = $vendor->getVendorId();
     $description = "A glorius bead to use";
     $leadTime = 10;
     $sku = "354";
     $title = "Bead-Green-Blue-Circular";
     $this->rawMaterial = new Product($productId, $vendorId, $description, $leadTime, $sku, $title);
     $this->rawMaterial->insert($this->getPDO());
 }
開發者ID:sandidgec,項目名稱:foodinventory,代碼行數:27,代碼來源:finished-product-test.php

示例6: actionAdmin

 public function actionAdmin()
 {
     $model = new Vendor('search');
     $model->unsetAttributes();
     if (isset($_GET['Vendor'])) {
         $model->setAttributes($_GET['Vendor']);
     }
     $this->render('admin', array('model' => $model));
 }
開發者ID:hanihh,項目名稱:vvs_v2,代碼行數:9,代碼來源:VendorController.php

示例7: save

 function save()
 {
     if ($this->valid()) {
         $attendee = new Vendor($this->params);
         return $attendee->create_with_id();
     } else {
         return false;
     }
 }
開發者ID:epochwolf,項目名稱:kairos,代碼行數:9,代碼來源:csvimport_vendor_form.php

示例8: createVendor

 public function createVendor()
 {
     if (isset($_POST['name']) && isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])) {
         $vendor = new Vendor();
         $vendor->name = $_POST['name'];
         $vendor->username = $_POST['username'];
         $vendor->email = $_POST['email'];
         $vendor->password = Hash::make($_POST['password']);
         $vendor->save();
         return Redirect::to('/')->with('error', 'Vendor Created!');
     } else {
         return Redirect::to('/')->with('error', 'Missing Information');
     }
 }
開發者ID:GeorgeBroadley,項目名稱:caffeine-vendor,代碼行數:14,代碼來源:AuthController.php

示例9: save

 function save()
 {
     $id = $this->input->post("id");
     if ($id == 0) {
         $vendorObject = new Vendor();
     } else {
         $vendorObject = new Vendor($id);
     }
     $vendorObject->name = $vendorObject->input->post("name", TRUE);
     $vendorObject->address = $vendorObject->input->post("address", TRUE);
     $vendorObject->number = $vendorObject->input->post("number", TRUE);
     $vendorObject->email = $vendorObject->input->post("email", TRUE);
     $vendorObject->save();
     echo $vendorObject->id;
 }
開發者ID:narendranag,項目名稱:Profectus,代碼行數:15,代碼來源:vendors.php

示例10: action_emails

 public function action_emails()
 {
     $view = View::make('admin.emails');
     $view->vendor_emails = Vendor::join('users', 'user_id', '=', 'users.id')->where_null('banned_at')->where('send_emails', '=', true)->lists('email');
     $view->officer_emails = Officer::join('users', 'user_id', '=', 'users.id')->where_null('banned_at')->where('send_emails', '=', true)->lists('email');
     $this->layout->content = $view;
 }
開發者ID:ajb,項目名稱:rfpez,代碼行數:7,代碼來源:admin.php

示例11: importData

 public function importData(Vendor $vendor)
 {
     $vendorConfig = $vendor->getConfig();
     while (!$vendor->endReached()) {
         $vendorItemData = $vendor->getNextLine();
         if (isset($vendorItemData['item']) && $vendorItemData['item'] != "") {
             $itemIds = $this->baseData->getItemIds($vendorItemData['item'], $vendor->getBaseDataColumn());
             if (!empty($itemIds)) {
                 foreach ($itemIds as $itemId) {
                     $query = "INSERT INTO " . $this->config['master-table'] . " (" . "item_id," . $vendorConfig['master-file-item-column-name'] . "," . $vendorConfig['master-file-price-column-name'] . "," . $vendorConfig['master-file-qty-column-name'] . ") VALUES (" . "'" . $itemId . "'," . "'" . $vendorItemData['item'] . "'," . $vendorItemData['price'] . "," . $vendorItemData['qty'] . ") ON DUPLICATE KEY UPDATE " . $vendorConfig['master-file-item-column-name'] . "='" . $vendorItemData['item'] . "'," . $vendorConfig['master-file-price-column-name'] . "= IF (" . $vendorConfig['master-file-price-column-name'] . "<" . $vendorItemData['price'] . "," . $vendorItemData['price'] . "," . $vendorConfig['master-file-price-column-name'] . ")," . $vendorConfig['master-file-qty-column-name'] . "=" . $vendorConfig['master-file-qty-column-name'] . "+" . $vendorItemData['qty'];
                     db_query($query);
                 }
             }
         }
     }
 }
開發者ID:diedsmiling,項目名稱:busenika,代碼行數:16,代碼來源:DBMasterData.php

示例12: store

 /**
  * Store a newly created resource in storage.
  * POST /balancesheets
  *
  * @return Response
  */
 public function store()
 {
     $balancesheet = new balancesheet();
     /* $balancesheet->name = Input::get('name');
        $balancesheet->save();
        $balancesheet->vendor_type = Input::get('vendortype');
        $balancesheet->save();*/
     $vendor = Vendor::find(Input::get('vendor'));
     $balancesheet->vendor_id = $vendor->id;
     $balancesheet->save();
     $balancesheet->total_amount = Input::get('Tamount');
     $balancesheet->save();
     $balancesheet->payable_amount = Input::get('Pamount');
     $balancesheet->save();
     $balancesheet->receivable_amount = Input::get('Ramount');
     $balancesheet->save();
     //         $balancesheet->vendor_id = Input::get('vendor');
     //        $balancesheet->save();
     if (Input::get('note') == '') {
         $balancesheet->note = 'N/A';
     } else {
         $balancesheet->note = Input::get('note');
     }
     $balancesheet->save();
     $balancesheet->balancesheet_id = "B0" . $balancesheet->id;
     $balancesheet->save();
     return Redirect::route('balancesheet.index');
 }
開發者ID:saqibtalib,項目名稱:EMR-ex-,代碼行數:34,代碼來源:BalancesheetsController.php

示例13: store

 public function store()
 {
     try {
         $createOrder = Input::json()->all();
         $addOrder = new Order();
         $addOrder->status = 1;
         $addOrder->save();
         $addOrderId = $addOrder->id;
         $numberOfItems = 0;
         foreach ($createOrder['items'] as $OrderItem) {
             $newOrderItem = new Order_Item();
             $newOrderItem->order_id = $addOrderId;
             $newOrderItem->item_id = $OrderItem['item_id'];
             $newOrderItem->order_qty = $OrderItem['order_qty'];
             $newOrderItem->save();
             $numberOfItems = $numberOfItems + 1;
         }
         $addOrder->items = $createOrder['items'];
         $addOrder->open = 'yes';
         $vendorId = $createOrder['vendor_id'];
         $addOrder->vendor_id = $vendorId;
         $vendorName = Vendor::find($vendorId);
         $addOrder->vendor_name = $vendorName->name;
         $addOrder->item_count = $numberOfItems;
         $this->addOrderToEmail($addOrder);
         return $addOrder->toJson();
     } catch (Exception $e) {
         return '{"error":{"text":' . $e->getMessage() . '}}';
     }
 }
開發者ID:p-tricky,項目名稱:CAEWeb,代碼行數:30,代碼來源:OrderApiController.php

示例14: index

 /**
  * Show a list of all of the application's users.
  *
  * @return Response
  */
 public function index()
 {
     $vendor = DB::table('vendors')->get();
     $lap_jenis = tipe_lap::lists('tipe', 'id');
     $vendor_name = Vendor::lists('nama', 'id');
     return view('admin.views', ['vendor' => $vendor], compact('lap_jenis', 'vendor_name'));
 }
開發者ID:ajisantoso,項目名稱:Project,代碼行數:12,代碼來源:vendorController.php

示例15: hookCustomerAccount

 public function hookCustomerAccount($params)
 {
     require_once dirname(__FILE__) . "/../ordervendor/Vendor.php";
     if (Vendor::currentVendor() != null) {
         return $this->display(__FILE__, 'menuitems.tpl');
     }
 }
開發者ID:redb,項目名稱:prestashop,代碼行數:7,代碼來源:serialnrmanager.php


注:本文中的Vendor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。