本文整理汇总了PHP中Controller::actionUpdate方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::actionUpdate方法的具体用法?PHP Controller::actionUpdate怎么用?PHP Controller::actionUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller::actionUpdate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$parentmatgroup = new Materialgroup('searchwstatus');
$parentmatgroup->unsetAttributes();
// clear any default values
if (isset($_GET['Parentmatgroup'])) {
$parentmatgroup->attributes = $_GET['Parentmatgroup'];
}
$materialtype = new Materialtype('searchwstatus');
$materialtype->unsetAttributes();
// clear any default values
if (isset($_GET['Materialtype'])) {
$materialtype->attributes = $_GET['Materialtype'];
}
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'materialgroupid' => $model->materialgroupid, 'materialgroupcode' => $model->materialgroupcode, 'description' => $model->description, 'parentmatgroupid' => $model->parentmatgroupid, 'parentmatgroupcode' => $model->parentmatgroup !== null ? $model->parentmatgroup->materialgroupcode : "", 'materialtypeid' => $model->materialtypeid, 'materialtypename' => $model->materialtype !== null ? $model->materialtype->description : "", 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model, 'parentmatgroup' => $parentmatgroup, 'materialtype' => $materialtype), true)));
Yii::app()->end();
}
}
}
示例2: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if (Yii::app()->request->isAjaxRequest) {
echo CJSON::encode(array('status' => 'success', 'absstatusid' => $model->absstatusid, 'shortstat' => $model->shortstat, 'longstat' => $model->longstat, 'isin' => $model->isin, 'priority' => $model->priority, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
示例3: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
$this->lookupdata();
if (Yii::app()->request->isAjaxRequest) {
echo CJSON::encode(array('status' => 'success', 'userfavid' => $model->userfavid, 'useraccessid' => $model->useraccessid, 'realname' => $model->useraccess->realname, 'menuaccessid' => $model->menuaccessid, 'menuname' => $model->menuaccess->menuname, 'div' => $this->renderPartial('_form', array('model' => $model, 'menuaccess' => $this->menuaccess, 'useraccess' => $this->useraccess), true)));
Yii::app()->end();
}
}
示例4: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$this->lookupdata();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if (Yii::app()->request->isAjaxRequest) {
echo CJSON::encode(array('status' => 'success', 'giheaderid' => $model->giheaderid, 'gino' => $model->gino, 'gidate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->gidate)), 'postdate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->postdate)), 'soheaderid' => $model->soheaderid, 'sono' => $model->soheader !== null ? $model->soheader->sono : "", 'deliveryadviceid' => $model->deliveryadviceid, 'dano' => $model->deliveryadvice !== null ? $model->deliveryadvice->dano : "", 'location' => $model->location, 'div' => $this->renderPartial('_form', array('model' => $model, 'gidetail' => $this->gidetail), true)));
Yii::app()->end();
}
}
示例5: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$this->lookupdata();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
//$this->performAjaxValidation($model);
if (Yii::app()->request->isAjaxRequest) {
echo CJSON::encode(array('status' => 'success', 'onleavetypeid' => $model->onleavetypeid, 'onleavename' => $model->onleavename, 'cutimax' => $model->cutimax, 'cutistart' => $model->cutistart, 'snroid' => $model->snroid, 'description' => $model->snro->description, 'absstatusid' => $model->absstatusid, 'shortstat' => $model->absstatus->shortstat, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model, 'snro' => $this->snro, 'absstatus' => $this->absstatus), true)));
Yii::app()->end();
}
}
示例6: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'useraccessid' => $model->useraccessid, 'username' => $model->username, 'password' => $model->password, 'realname' => $model->realname, 'email' => $model->email, 'phoneno' => $model->phoneno, 'languageid' => $model->languageid, 'languagename' => $model->language !== null ? $model->language->languagename : "", 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例7: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'usergroupid' => $model->usergroupid, 'useraccessid' => $model->useraccessid, 'username' => $model->useraccess->username, 'groupaccessid' => $model->groupaccessid, 'groupname' => $model->groupaccess->groupname, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model, 'useraccess' => $this->useraccess, 'groupaccess' => $this->groupaccess), true)));
Yii::app()->end();
}
}
}
示例8: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'addressbookid' => $model->addressbookid, 'fullname' => $model->fullname, 'iscustomer' => $model->iscustomer, 'isemployee' => $model->isemployee, 'isapplicant' => $model->isapplicant, 'isvendor' => $model->isvendor, 'isinsurance' => $model->isinsurance, 'isbank' => $model->isbank, 'ishospital' => $model->ishospital, 'iscatering' => $model->iscatering, 'isstudent' => $model->isstudent, 'recordstatus' => $model->recordstatus, 'taxno' => $model->taxno, 'abno' => $model->abno, 'accpiutangid' => $model->accpiutangid, 'acchutangid' => $model->acchutangid, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例9: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'snrodid' => $model->snrodid, 'snroid' => $model->snroid, 'curdd' => $model->curdd, 'curmm' => $model->curmm, 'curyy' => $model->curyy, 'curvalue' => $model->curvalue, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例10: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'taxid' => $model->taxid, 'taxcode' => $model->taxcode, 'taxvalue' => $model->taxvalue, 'description' => $model->description, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例11: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'wfstatusid' => $model->wfstatusid, 'workflowid' => $model->workflowid, 'wfname' => $model->workflow !== null ? $model->workflow->wfname : "", 'wfstatusname' => $model->wfstatusname, 'wfstat' => $model->wfstat, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例12: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'subdistrictid' => $model->subdistrictid, 'cityid' => $model->cityid, 'cityname' => $model->city !== null ? $model->city->cityname : "", 'subdistrictname' => $model->subdistrictname, 'zipcode' => $model->zipcode, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例13: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'accperiodid' => $model->accperiodid, 'period' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->period)), 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model), true)));
Yii::app()->end();
}
}
}
示例14: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$this->lookupdata();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'employeetypeid' => $model->employeetypeid, 'employeetypename' => $model->employeetypename, 'snroid' => $model->snroid, 'snroname' => $model->snro->description, 'sicksnroid' => $model->sicksnroid, 'sicksnroname' => $model->sicksnro->description, 'sickstatusid' => $model->sickstatusid, 'sickstatusname' => $model->sickstatus->shortstat, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model, 'snro' => $this->snro, 'sicksnro' => $this->sicksnro, 'sickstatus' => $this->sickstatus), true)));
Yii::app()->end();
}
}
}
示例15: actionUpdate
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate()
{
parent::actionUpdate();
$this->lookupdata();
$id = $_POST['id'];
$model = $this->loadModel($id[0]);
if ($model != null) {
if ($this->CheckDataLock($this->menuname, $id[0]) == false) {
$this->InsertLock($this->menuname, $id[0]);
echo CJSON::encode(array('status' => 'success', 'absruleid' => $model->absruleid, 'absscheduleid' => $model->absscheduleid, 'absschedulename' => $model->absschedule !== null ? $model->absschedule->absschedulename : "", 'difftimein' => $model->difftimein, 'difftimeout' => $model->difftimeout, 'absstatusid' => $model->absstatus !== null ? $model->absstatus->absstatusid : "", 'shortstat' => $model->absstatus !== null ? $model->absstatus->shortstat : "", 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model, 'absschedule' => $this->absschedule, 'absstatus' => $this->absstatus), true)));
Yii::app()->end();
}
}
}