本文整理汇总了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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}