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


PHP Controller::actionCreate方法代碼示例

本文整理匯總了PHP中Controller::actionCreate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Controller::actionCreate方法的具體用法?PHP Controller::actionCreate怎麽用?PHP Controller::actionCreate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Controller的用法示例。


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

示例1: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $supplier = new Supplier('searchwstatus');
     $supplier->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $supplier->attributes = $_GET['Supplier'];
     }
     $product = new Product('searchwstatus');
     $product->unsetAttributes();
     // clear any default values
     if (isset($_GET['Product'])) {
         $product->attributes = $_GET['Product'];
     }
     $purchasinggroup = new Purchasinggroup('searchwstatus');
     $purchasinggroup->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchasinggroup'])) {
         $purchasinggroup->attributes = $_GET['Purchasinggroup'];
     }
     $currency = new Currency('searchwstatus');
     $currency->unsetAttributes();
     // clear any default values
     if (isset($_GET['Currency'])) {
         $currency->attributes = $_GET['Currency'];
     }
     $model = new Purchinforec();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'supplier' => $supplier, 'product' => $product, 'purchasinggroup' => $purchasinggroup, 'currency' => $currency), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:39,代碼來源:PurchinforecController.php

示例2: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $model = new Maritalstatus();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:13,代碼來源:MaritalstatusController.php

示例3: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Company();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'currency' => $this->currency, 'city' => $this->city), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:CompanyController.php

示例4: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Onleavetype();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'snro' => $this->snro, 'absstatus' => $this->absstatus), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:OnleavetypeController.php

示例5: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $model = new Userfav();
     $this->lookupdata();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'menuaccess' => $this->menuaccess, 'useraccess' => $this->useraccess), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:UserfavController.php

示例6: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Jobs();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'orgstructure' => $this->orgstructure, 'position' => $this->position), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:JobsController.php

示例7: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Catalogsys();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'language' => $this->language), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:CatalogsysController.php

示例8: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Accounttype();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'parentaccounttype' => $this->parentaccounttype), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:AccounttypeController.php

示例9: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Wfgroup();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'workflow' => $this->workflow, 'groupaccess' => $this->groupaccess), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:14,代碼來源:WfgroupController.php

示例10: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $model = new Tax();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:15,代碼來源:TaxController.php

示例11: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Employeeschedule();
     $model->recordstatus = 1;
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'employee' => $this->employee), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:15,代碼來源:EmployeescheduleController.php

示例12: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Productdetail();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'product' => $this->product, 'currency' => $this->currency, 'unitofmeasure' => $this->unitofmeasure, 'sloc' => $this->sloc, 'materialstatus' => $this->materialstatus, 'ownership' => $this->ownership), true)));
         Yii::app()->end();
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:16,代碼來源:ProductdetailController.php

示例13: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Giheader();
     $model->recordstatus = 1;
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'giheaderid' => $model->giheaderid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'gidetail' => $this->gidetail), true)));
             Yii::app()->end();
         }
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:17,代碼來源:GiheaderController.php

示例14: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Prheader();
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('inspr');
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'prheaderid' => $model->prheaderid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'prmaterial' => $this->prmaterial), true)));
             Yii::app()->end();
         }
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:17,代碼來源:PrheaderController.php

示例15: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Deliveryadvice();
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('insda');
     $model->useraccessid = Useraccess::model()->findbysql("select * from useraccess \n        where upper(username)=upper('" . Yii::app()->user->name . "')")->useraccessid;
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'deliveryadviceid' => $model->deliveryadviceid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'deliveryadvicedetail' => $this->deliveryadvicedetail), true)));
             Yii::app()->end();
         }
     }
 }
開發者ID:bylinggha,項目名稱:Capella-ERP-Indonesia,代碼行數:18,代碼來源:DeliveryadviceController.php


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