当前位置: 首页>>代码示例>>PHP>>正文


PHP Jobs::save方法代码示例

本文整理汇总了PHP中Jobs::save方法的典型用法代码示例。如果您正苦于以下问题:PHP Jobs::save方法的具体用法?PHP Jobs::save怎么用?PHP Jobs::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Jobs的用法示例。


在下文中一共展示了Jobs::save方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Jobs();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Jobs'])) {
         $model->attributes = $_POST['Jobs'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:17,代码来源:JobsController.php

示例2: actionCreate

 public function actionCreate()
 {
     $model = new Jobs();
     if (isset($_POST['Jobs'])) {
         $model->setAttributes($_POST['Jobs']);
         if ($model->save()) {
             if (Yii::app()->getRequest()->getIsAjaxRequest()) {
                 Yii::app()->end();
             } else {
                 $this->redirect(array('view', 'id' => $model->id));
             }
         }
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:redsn0w422,项目名称:DarshanVis,代码行数:15,代码来源:JobsController.php

示例3: getSave

 public function getSave()
 {
     $id = Input::get('id');
     if ($id) {
         $job = Jobs::find($id);
         $job->name = Input::get('name');
         $job->max_salary = Input::get('max_salary');
         $job->min_salary = Input::get('min_salary');
         $job->save();
         Session::flash('message', 'The records are updated successfully');
     } else {
         $job = new Jobs();
         $job->name = Input::get('name');
         $job->max_salary = Input::get('max_salary');
         $job->min_salary = Input::get('min_salary');
         $job->save();
         Session::flash('message', 'The records are inserted successfully');
     }
     return Redirect::to('job');
 }
开发者ID:andrinda,项目名称:myhotel,代码行数:20,代码来源:JobController.php

示例4: bulkImportOrder

 public function bulkImportOrder()
 {
     DB::transaction(function () {
         $orderdetails_count = count(Input::json('orderdetails'));
         $orderDetails = Input::json('orderdetails');
         $skip_count = 0;
         for ($i = 0; $i < $orderdetails_count; $i++) {
             if (Order::where('RefOrderId', '=', $orderDetails[$i]['Order_ID'])->count() > 0) {
                 $skip_count++;
             } else {
                 //Insert New Jobs Details in Jobs Table
                 $jobs_dtl = new Jobs();
                 $jobs_dtl->Channel_Id = $orderDetails[$i]['Channel_Id'];
                 $jobs_dtl->Job_Type_Id = "1";
                 $jobs_dtl->Job_Status_Id = "1";
                 $jobs_dtl->ACTIVE = 1;
                 $jobs_dtl->CREATE_TS = date("Y-m-d H:i:s");
                 $jobs_dtl->MODIFY_TS = date("Y-m-d H:i:s");
                 $jobs_dtl->save();
                 //return Response::json($jobs_dtl);
                 // Insert New order Details in Order Table
                 $order_dtl = new Order();
                 $order_dtl->Job_Id = $jobs_dtl->id;
                 $order_dtl->Order_Date = date("Y-m-d", strtotime($orderDetails[$i]['Order_Date']));
                 //$orderDetails[$i]['Order_Date'];
                 $order_dtl->ChannelName = $orderDetails[$i]['Channel_Name'];
                 $order_dtl->OrderStatus = $orderDetails[$i]['Order_Status'];
                 $order_dtl->SubTotal = $orderDetails[$i]['SubTotal'];
                 $order_dtl->Tax = $orderDetails[$i]['Tax'];
                 $order_dtl->TaxRate = $orderDetails[$i]['Tax_Rate'];
                 $order_dtl->ShipRate = $orderDetails[$i]['Ship_Rate'];
                 $order_dtl->FinalTotal = $orderDetails[$i]['Final_Total'];
                 $order_dtl->ShipMethod = $orderDetails[$i]['Ship_Method'];
                 //$order_dtl->Requested_Ship_Date =  "";
                 $order_dtl->ShipName = $orderDetails[$i]['Ship_FirstName'] . ' ' . $orderDetails[$i]['Ship_LastName'];
                 $order_dtl->ShipAddress1 = $orderDetails[$i]['Ship_Address1'];
                 $order_dtl->ShipAddress2 = $orderDetails[$i]['Ship_Address2'];
                 $order_dtl->ShipCompany = $orderDetails[$i]['Ship_Company'];
                 $order_dtl->ShipCity = $orderDetails[$i]['Ship_City'];
                 $order_dtl->ShipZip = $orderDetails[$i]['Ship_PostalCode'];
                 $order_dtl->ShipState = $orderDetails[$i]['Ship_StateProvince'];
                 $order_dtl->ShipCountry = $orderDetails[$i]['Ship_Country'];
                 $order_dtl->ShipEmail = $orderDetails[$i]['Bill_Email'];
                 $order_dtl->BillName = $orderDetails[$i]['Bill_FirstName'] . ' ' . $orderDetails[$i]['Bill_LastName'];
                 $order_dtl->BillAddress1 = $orderDetails[$i]['Bill_Address1'];
                 $order_dtl->BillAddress2 = $orderDetails[$i]['Bill_Address2'];
                 $order_dtl->BillCompany = $orderDetails[$i]['Bill_Company'];
                 $order_dtl->BillCity = $orderDetails[$i]['Bill_City'];
                 $order_dtl->BillZip = $orderDetails[$i]['Bill_PostalCode'];
                 $order_dtl->BillState = $orderDetails[$i]['Bill_StateProvince'];
                 $order_dtl->BillCountry = $orderDetails[$i]['Bill_Country'];
                 $order_dtl->BillEmail = $orderDetails[$i]['Bill_Email'];
                 $order_dtl->BillPhone = $orderDetails[$i]['Bill_Phone_Number'];
                 $order_dtl->RefOrderId = $orderDetails[$i]['Order_ID'];
                 //$order_dtl->OrderTotal 			=  "";
                 $order_dtl->TotalShipmentPrice = $orderDetails[$i]['Ship_Rate'];
                 //$order_dtl->ShipmentsTotalCost 	=  "";
                 //$order_dtl->CarrierName 		=  "";
                 //$order_dtl->CarrierServiceName 	=  "";
                 //$order_dtl->Comments 			=  "";
                 $order_dtl->ACTIVE = 1;
                 $order_dtl->CREATE_TS = date("Y-m-d H:i:s");
                 $order_dtl->MODIFY_TS = date("Y-m-d H:i:s");
                 $order_dtl->save();
                 //return Response::json($order_dtl);
                 // Order Item Table
                 $order_item_dtl = new Orderitems();
                 $order_item_dtl->Order_Id = $order_dtl->id;
                 $order_item_dtl->Order_Item = 0;
                 $order_item_dtl->ItemName = $orderDetails[$i]['Product_Name'];
                 $order_item_dtl->ItemDescription = $orderDetails[$i]['Product_Customizations_Description'];
                 //$order_item_dtl->SKU 				= "";
                 //$order_item_dtl->UnitWeight 		= "";
                 $order_item_dtl->ItemPrice = $orderDetails[$i]['Product_Paid'];
                 $order_item_dtl->ItemRefId = $orderDetails[$i]['Order_ID'];
                 $order_item_dtl->Order_Qty = $orderDetails[$i]['Product_Quantity'];
                 $order_item_dtl->Balance_Qty = $orderDetails[$i]['Product_Quantity'];
                 $order_item_dtl->ProductName = $orderDetails[$i]['Product_Name'];
                 $order_item_dtl->ProductPartNumber = $orderDetails[$i]['Product_Part_Number'];
                 $order_item_dtl->ProductPaid = $orderDetails[$i]['Product_Paid'];
                 $order_item_dtl->ProductQuantity = $orderDetails[$i]['Product_Quantity'];
                 $order_item_dtl->ProductCustomizationDescription = $orderDetails[$i]['Product_Customizations_Description'];
                 $order_item_dtl->ACTIVE = 1;
                 $order_item_dtl->CREATE_TS = date("Y-m-d H:i:s");
                 $order_item_dtl->MODIFY_TS = date("Y-m-d H:i:s");
                 $order_item_dtl->save();
                 $orderItems_count = count(Input::json('orderdetails')[$i]['Items']);
                 $itemDetails = Input::json('orderdetails')[$i]['Items'];
                 if ($orderItems_count > 0) {
                     for ($j = 0; $j < $orderItems_count; $j++) {
                         // Order Item Table
                         $order_item_dtl = new Orderitems();
                         $order_item_dtl->Order_Id = $order_dtl->id;
                         $order_item_dtl->Order_Item = 0;
                         $order_item_dtl->ItemName = $itemDetails[$j]['Product_Name'];
                         $order_item_dtl->ItemDescription = $itemDetails[$j]['Product_Customizations_Description'];
                         //$order_item_dtl->SKU 				= "";
                         //$order_item_dtl->UnitWeight 		= "";
                         $order_item_dtl->ItemPrice = $itemDetails[$j]['Product_Paid'];
                         $order_item_dtl->ItemRefId = $itemDetails[$j]['Order_ID'];
//.........这里部分代码省略.........
开发者ID:victory21th,项目名称:Laravel-AngularJS,代码行数:101,代码来源:OrderController.php

示例5: flash

 if (!empty($_POST['expire_time'])) {
     $vals['expire_time'] = Times::dateConvert($_POST['expire_time']);
 }
 $check_job_update = $g['job_check'];
 if ($check_job_update == "0") {
     $vals['status'] = 1;
     $message_info = 'msg_wait_success';
 } else {
     $vals['status'] = 0;
     $message_info = 'msg_wait_check';
 }
 $vals['industry_id'] = PbController::getMultiId($_POST['industry']['id']);
 $vals['area_id'] = PbController::getMultiId($_POST['area']['id']);
 if (!empty($id)) {
     $vals['modified'] = $time_stamp;
     $result = $job->save($vals, "update", $id, null, "member_id=" . $the_memberid);
 } else {
     if ($g['max_job'] && $now_job_amount >= $g['max_job']) {
         flash('one_day_max');
     }
     $vals['created'] = $vals['modified'] = $time_stamp;
     $vals['company_id'] = $companyinfo['id'];
     $vals['member_id'] = $the_memberid;
     $vals['cache_spacename'] = $pdb->GetOne("SELECT space_name FROM {$tb_prefix}members WHERE id=" . $the_memberid);
     $result = $job->save($vals);
 }
 if (!$result) {
     flash();
 } else {
     flash($message_info);
 }
开发者ID:renduples,项目名称:alibtob,代码行数:31,代码来源:job.php

示例6: array

<?php

require_once __DIR__ . "/../vendor/autoload.php";
require_once __DIR__ . "/../src/Jobs.php";
session_start();
if (empty($_SESSION['job-list'])) {
    $_SESSION['job-list'] = array();
}
$app = new Silex\Application();
$app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views'));
$app->get("/", function () use($app) {
    return $app['twig']->render('jobslist.html.twig', array('jobs' => Jobs::getAll()));
});
$app->post("/jobcreate", function () use($app) {
    $job = new Jobs($_POST['company'], $_POST['title'], $_POST['description'], $_POST['start'], $_POST['end']);
    $job->save();
    return $app['twig']->render('jobadded.html.twig');
});
$app->post("/session_cleared", function () use($app) {
    Jobs::reset();
    return $app['twig']->render('reset.html.twig');
});
return $app;
开发者ID:adamrr724,项目名称:Jobs-PHP,代码行数:23,代码来源:app.php

示例7: Jobs

<?php 
include 'admin-config.php';
include 'header.php';
$id = $active = $error = "";
if (strlen(Request::post("submit"))) {
    $id = Request::post("id");
    $active = Validation::getStautsTinyVal(Request::post("active"));
    $jobsObj = new Jobs();
    $jobsObj->set("id", $id);
    $jobsObj->set("active", $active);
    if ($jobsObj->save()) {
        General::redirectUrl("post-law-legal-jobs.php");
    } else {
        $error = "jobs Name alreday exist !";
    }
}
?>
<div class="ch-container">
    <div class="row">

        <!-- left menu starts -->
        <?php 
include 'sitebar.php';
?>
        <!--/span-->
        <!-- left menu ends -->



        <div id="content" class="col-lg-10 col-sm-10">
开发者ID:sonaljain888,项目名称:project-legal-lawyer-,代码行数:30,代码来源:Jobs.php

示例8: flash

     $id = $_POST['id'];
 }
 if (!empty($_POST['expire_time'])) {
     $vals['expire_time'] = Times::dateConvert($_POST['expire_time']);
 }
 $check_job_update = $g['job_check'];
 if ($check_job_update == "0") {
     $vals['status'] = 1;
     $message_info = 'msg_wait_success';
 } else {
     $vals['status'] = 0;
     $message_info = 'msg_wait_check';
 }
 if (!empty($id)) {
     $vals['modified'] = $time_stamp;
     $result = $job->save($vals, "update", $id, null, "member_id=" . $_SESSION['MemberID']);
 } else {
     if ($g['max_job'] && $now_job_amount >= $g['max_job']) {
         flash('one_day_max');
     }
     $vals['created'] = $vals['modified'] = $time_stamp;
     $vals['company_id'] = $companyinfo['id'];
     $vals['member_id'] = $_SESSION['MemberID'];
     $vals['cache_spacename'] = $pdb->GetOne("SELECT space_name FROM {$tb_prefix}members WHERE id=" . $_SESSION['MemberID']);
     $result = $job->save($vals);
 }
 if (!$result) {
     flash();
 } else {
     flash($message_info);
 }
开发者ID:vuong93st,项目名称:w-game,代码行数:31,代码来源:job.php

示例9: array

<?php

require_once __DIR__ . "/../vendor/autoload.php";
require_once __DIR__ . "/../src/Jobs.php";
session_start();
if (empty($_SESSION['list_of_jobs'])) {
    $_SESSION['list_of_jobs'] = array();
}
$app = new Silex\Application();
$app->register(new Silex\Provider\TwigServiceProvider(), array('twig.path' => __DIR__ . '/../views'));
$app->get("/", function () use($app) {
    return $app['twig']->render('jobs.html.twig', array('jobs' => Jobs::getAll()));
});
$app->post("/jobs", function () use($app) {
    $jobs = new Jobs($_POST['title'], $_POST['salary'], $_POST['desc']);
    $jobs->save();
    return $app['twig']->render('create_jobs.html.twig', array('newjob' => $jobs));
});
$app->post("/delete_jobs", function () use($app) {
    Jobs::deleteAll();
    return $app['twig']->render('delete_jobs.html.twig');
});
return $app;
开发者ID:jwnardini,项目名称:TwigJobs,代码行数:23,代码来源:app.php

示例10: storeDirectShipment

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function storeDirectShipment()
 {
     $id = Input::json('channel_name');
     $channel_name_tbl = $this->getChannelName($id);
     $id = Input::json('warehouse');
     $warehouse_name_tbl = $this->getWarehouseName($id);
     // Insert New jobs Details in jobs Table
     $jobs_dtl = new Jobs();
     $jobs_dtl->Channel_Id = Input::json('channel_name');
     $jobs_dtl->Job_Type_Id = "4";
     $jobs_dtl->Job_Status_Id = "4";
     $jobs_dtl->ACTIVE = 1;
     $jobs_dtl->CREATE_TS = date("Y-m-d H:i:s");
     $jobs_dtl->MODIFY_TS = date("Y-m-d H:i:s");
     $jobs_dtl->save();
     // Insert New Shipments Details in Shipments Table
     $shipment_dtl = new Shipments();
     $shipment_dtl->Job_Id = $jobs_dtl->Job_Id;
     $shipment_dtl->Date_Of_Shipment = Input::json('date_of_shipment');
     $shipment_dtl->Channel_Name = $channel_name_tbl;
     $shipment_dtl->Warehouse_Id = Input::json('warehouse');
     $shipment_dtl->Warehouse_Name = $warehouse_name_tbl;
     $shipment_dtl->Carrier_Id = Input::json('carrier_name');
     $shipment_dtl->CarrierService_Id = Input::json('carrier_service_name');
     $shipment_dtl->RecipientName = Input::json('recipient_name');
     $shipment_dtl->ShipAddress1 = Input::json('shippingaddress');
     $shipment_dtl->ShipAddress2 = Input::json('shippingaddress2');
     $shipment_dtl->ShipCountry = Input::json('shipcountry');
     $shipment_dtl->ShipState = Input::json('shipstate');
     $shipment_dtl->ShipCity = Input::json('shipcity');
     $shipment_dtl->ShipZip = Input::json('shipzip');
     $shipment_dtl->ShipEmail = Input::json('ship_email');
     $shipment_dtl->ShippingAccount = Input::json('shipping_account');
     $shipment_dtl->TrackingNumber = Input::json('tracking_number');
     $shipment_dtl->ShipmentCost = Input::json('shipment_cost');
     $shipment_dtl->SignatureRequired = Input::json('signature_required');
     $shipment_dtl->EmailNotification = Input::json('email_notification');
     $shipment_dtl->ActualShipmentCost = Input::json('actual_shipment_cost');
     $shipment_dtl->AdditionalNotes = Input::json('additional_notes');
     $shipment_dtl->ACTIVE = 1;
     $shipment_dtl->CREATE_TS = date("Y-m-d H:i:s");
     $shipment_dtl->MODIFY_TS = date("Y-m-d H:i:s");
     $shipment_dtl->save();
     //Particular Shipment Qty Details
     $order_item_count = Input::json('item_count');
     $deleted_item_array = array();
     $deleted_item_array = Input::json('deleted_item_list');
     for ($i = 1; $i <= $order_item_count; $i++) {
         if (!in_array($i, $deleted_item_array)) {
             if (isset(Input::json('order_item')['order_item' . $i])) {
                 $prod_list = $this->getProductDetailsByProductId(Input::json('order_item')['order_item' . $i]);
                 $itm_id = Input::json('order_item')['order_item' . $i];
                 $channel_id = Input::json('channel_name');
                 $warehouse_ids = Input::json('warehouse');
                 $inventory_id = $this->getInventoryIDByProdId($itm_id, $warehouse_ids, $channel_id);
                 $inv_id = $inventory_id[0]->InventoryItem_Id;
                 $stock_count = $inventory_id[0]->Stock_Count;
                 $order_shb_item_dtl = new ShipmentItems();
                 $order_shb_item_dtl->Shipment_Id = $shipment_dtl->Shipment_Id;
                 $order_shb_item_dtl->Inventory_Item_Id = $inv_id;
                 $order_shb_item_dtl->ItemName = $prod_list[0]->Product_Name;
                 $order_shb_item_dtl->Order_Qty = Input::json('order_qty')['order_qty' . $i];
                 $order_shb_item_dtl->Shipment_Qty = Input::json('shipping_qty')['shipping_qty' . $i];
                 $order_shb_item_dtl->Ship_Balance_Qty = Input::json('shipping_qty')['shipping_qty' . $i];
                 $order_shb_item_dtl->CREATE_TS = date("Y-m-d H:i:s");
                 $order_shb_item_dtl->MODIFY_TS = date("Y-m-d H:i:s");
                 $order_shb_item_dtl->save();
                 $bal_qty = Input::json('avilable_qty')['avilable_qty' . $i] - Input::json('shipping_qty')['shipping_qty' . $i];
                 $this->updateStockCountInventoryItems($bal_qty, $inv_id);
                 $inv_log_dtl = new InventoryItemLog();
                 $inv_log_dtl->Job_Id = $jobs_dtl->Job_Id;
                 $inv_log_dtl->InventoryItem_Id = $inv_id;
                 $inv_log_dtl->Product_Id = Input::json('order_item')['order_item' . $i];
                 $inv_log_dtl->Channel_Id = Input::json('channel_name');
                 $inv_log_dtl->Warehouse_Id = Input::json('warehouse');
                 $inv_log_dtl->Stock_Count = $bal_qty;
                 $inv_log_dtl->Re_Order_Level = "0";
                 $inv_log_dtl->Notes = "";
                 $inv_log_dtl->Reason = "";
                 $inv_log_dtl->LastCycleCount = "0";
                 $inv_log_dtl->LastAdjustmentCount = "0";
                 $inv_log_dtl->Active = 1;
                 $inv_log_dtl->Create_ts = date("Y-m-d H:i:s");
                 $inv_log_dtl->Modify_ts = date("Y-m-d H:i:s");
                 $inv_log_dtl->save();
             }
         }
     }
     return Response::json(array('Response' => $shipment_dtl->id, 'flash' => 'Save Successfully!!!!!'));
 }
开发者ID:victory21th,项目名称:Laravel-AngularJS,代码行数:95,代码来源:ShipmentController.php

示例11: actionUpload

 public function actionUpload()
 {
     parent::actionUpload();
     $folder = $_SERVER['DOCUMENT_ROOT'] . Yii::app()->request->baseUrl . '/upload/';
     // folder for uploaded files
     $file = $folder . basename($_FILES['uploadfile']['name']);
     if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
         $row = 0;
         if (($handle = fopen($file, "r")) !== FALSE) {
             while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
                 if ($row > 0) {
                     $model = Jobs::model()->findByPk((int) $data[0]);
                     if ($model === null) {
                         $model = new Jobs();
                     }
                     $model->jobsid = (int) $data[0];
                     $structure = Orgstructure::model()->findbyattributes(array('structurename' => $data[1]));
                     if ($structure !== null) {
                         $model->orgstructureid = $structure->orgstructureid;
                     }
                     $position = Orgstructure::model()->findbyattributes(array('positionname' => $data[2]));
                     if ($position !== null) {
                         $model->positionid = $structure->positionid;
                     }
                     $model->jobdesc = $data[3];
                     $model->qualification = $data[4];
                     $model->recordstatus = (int) $data[5];
                     try {
                         if (!$model->save()) {
                             $this->messages = $this->messages . Catalogsys::model()->getcatalog(' upload error at ' . $data[0]);
                         }
                     } catch (Exception $e) {
                         $this->messages = $this->messages . $e->getMessage();
                     }
                 }
                 $row++;
             }
         } else {
             $this->messages = $this->messages . ' memory or harddisk full';
         }
         fclose($handle);
     } else {
         $this->messages = $this->messages . ' check your directory permission';
     }
     if ($this->messages == '') {
         $this->messages = 'success';
     }
     echo $this->messages;
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:49,代码来源:JobsController.php


注:本文中的Jobs::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。