当前位置: 首页>>代码示例>>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;未经允许,请勿转载。