本文整理汇总了PHP中Controller::actionWrite方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::actionWrite方法的具体用法?PHP Controller::actionWrite怎么用?PHP Controller::actionWrite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller::actionWrite方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Jobs'])) {
$messages = $this->ValidateData(array(array($_POST['Jobs']['orgstructureid'], 'emptyorgstructure', 'emptystring'), array($_POST['Jobs']['jobdesc'], 'emptyjobdesc', 'emptystring'), array($_POST['Jobs']['qualification'], 'emptyqualification', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Absstatus'];
if ((int) $_POST['Jobs']['jobsid'] > 0) {
$model = $this->loadModel($_POST['Jobs']['jobsid']);
$model->orgstructureid = $_POST['Jobs']['orgstructureid'];
$model->positionid = $_POST['Jobs']['positionid'];
$model->jobdesc = $_POST['Jobs']['jobdesc'];
$model->qualification = $_POST['Jobs']['qualification'];
$model->recordstatus = $_POST['Jobs']['recordstatus'];
} else {
$model = new Jobs();
$model->attributes = $_POST['Jobs'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Jobs']['jobsid']);
$this->GetSMessage('homjoinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例2: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Absstatus'])) {
$messages = $this->ValidateData(array(array($_POST['Absstatus']['shortstat'], 'emptyshortstat', 'emptystring'), array($_POST['Absstatus']['longstat'], 'hrtasemptylongstat', 'emptystring'), array($_POST['Absstatus']['priority'], 'hrtasemptypriority', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Absstatus'];
if ((int) $_POST['Absstatus']['absstatusid'] > 0) {
$model = $this->loadModel($_POST['Absstatus']['absstatusid']);
$model->shortstat = $_POST['Absstatus']['shortstat'];
$model->longstat = $_POST['Absstatus']['longstat'];
$model->isin = $_POST['Absstatus']['isin'];
$model->priority = $_POST['Absstatus']['priority'];
$model->recordstatus = $_POST['Absstatus']['recordstatus'];
} else {
$model = new Absstatus();
$model->attributes = $_POST['Absstatus'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Absstatus']['absstatusid']);
$this->GetSMessage('hrtasinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例3: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Maritalstatus'])) {
$messages = $this->ValidateData(array(array($_POST['Maritalstatus']['maritalstatusname'], 'emptymaritalstatusname', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Maritalstatus'];
if ((int) $_POST['Maritalstatus']['maritalstatusid'] > 0) {
$model = $this->loadModel($_POST['Maritalstatus']['maritalstatusid']);
$model->maritalstatusname = $_POST['Maritalstatus']['maritalstatusname'];
$model->recordstatus = $_POST['Maritalstatus']['recordstatus'];
} else {
$model = new Maritalstatus();
$model->attributes = $_POST['Maritalstatus'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Maritalstatus']['maritalstatusid']);
$this->GetSMessage('hmmsinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例4: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Onleavetype'])) {
$messages = $this->ValidateData(array(array($_POST['Onleavetype']['onleavename'], 'emptyonleavename', 'emptystring'), array($_POST['Onleavetype']['cutimax'], 'emptycutimax', 'emptystring'), array($_POST['Onleavetype']['cutistart'], 'emptycustistart', 'emptystring'), array($_POST['Onleavetype']['snroid'], 'emptysnro', 'emptystring'), array($_POST['Onleavetype']['absstatusid'], 'emptyabstatus', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Onleavetype'];
if ((int) $_POST['Onleavetype']['onleavetypeid'] > 0) {
$model = $this->loadModel($_POST['Onleavetype']['onleavetypeid']);
$model->onleavename = $_POST['Onleavetype']['onleavename'];
$model->snroid = $_POST['Onleavetype']['snroid'];
$model->absstatusid = $_POST['Onleavetype']['absstatusid'];
$model->cutimax = $_POST['Onleavetype']['cutimax'];
$model->cutistart = $_POST['Onleavetype']['cutistart'];
$model->recordstatus = $_POST['Onleavetype']['recordstatus'];
} else {
$model = new Onleavetype();
$model->attributes = $_POST['Onleavetype'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Onleavetype']['onleavetypeid']);
$this->GetSMessage('hpaoltinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例5: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Company'])) {
$messages = $this->ValidateData(array(array($_POST['Company']['companyname'], 'emptycompanyname', 'emptystring'), array($_POST['Company']['address'], 'emptyaddressname', 'emptystring'), array($_POST['Company']['cityid'], 'emptycityname', 'emptystring'), array($_POST['Company']['zipcode'], 'emptyzipcode', 'emptystring'), array($_POST['Company']['currencyid'], 'emptycurrency', 'emptystring')));
if ($messages == '') {
if ((int) $_POST['Company']['companyid'] > 0) {
$model = $this->loadModel($_POST['Company']['companyid']);
$model->companyname = $_POST['Company']['companyname'];
$model->address = $_POST['Company']['address'];
$model->cityid = $_POST['Company']['cityid'];
$model->zipcode = $_POST['Company']['zipcode'];
$model->taxno = $_POST['Company']['taxno'];
$model->currencyid = $_POST['Company']['currencyid'];
$model->recordstatus = $_POST['Company']['recordstatus'];
} else {
$model = new Company();
$model->attributes = $_POST['Company'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Company']['companyid']);
$this->GetSMessage('scoinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例6: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Parameter'])) {
$messages = $this->ValidateData(array(array($_POST['Parameter']['paramname'], 'emptyparamname', 'emptystring'), array($_POST['Parameter']['paramvalue'], 'emptyparamvalue', 'emptystring'), array($_POST['Parameter']['description'], 'emptydescription', 'emptystring')));
if ($messages == '') {
if ((int) $_POST['Parameter']['parameterid'] > 0) {
$model = $this->loadModel($_POST['Parameter']['parameterid']);
$model->paramname = $_POST['Parameter']['paramname'];
$model->paramvalue = $_POST['Parameter']['paramvalue'];
$model->description = $_POST['Parameter']['description'];
$model->recordstatus = $_POST['Parameter']['recordstatus'];
} else {
$model = new Parameter();
$model->attributes = $_POST['Parameter'];
}
try {
if ($model->save()) {
$this->GetSMessage('spinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例7: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Snro'])) {
$messages = $this->ValidateData(array(array($_POST['Snro']['description'], 'emptydescription', 'emptystring'), array($_POST['Snro']['formatdoc'], 'emptyformatdoc', 'emptystring'), array($_POST['Snro']['formatno'], 'emptyformatno', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Snro'];
if ((int) $_POST['Snro']['snroid'] > 0) {
$model = $this->loadModel($_POST['Snro']['snroid']);
$model->description = $_POST['Snro']['description'];
$model->formatdoc = $_POST['Snro']['formatdoc'];
$model->formatno = $_POST['Snro']['formatno'];
$model->repeatby = $_POST['Snro']['repeatby'];
$model->recordstatus = $_POST['Snro']['recordstatus'];
} else {
$model = new Snro();
$model->attributes = $_POST['Snro'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Snro']['snroid']);
$this->GetSMessage('agjinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例8: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Catalogsys'])) {
$messages = $this->ValidateData(array(array($_POST['Catalogsys']['languageid'], 'sctemptylanguage', 'emptystring'), array($_POST['Catalogsys']['catalogname'], 'sctemptycatalogname', 'emptystring'), array($_POST['Catalogsys']['catalogval'], 'sctemptycatalogval', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Absstatus'];
if ((int) $_POST['Catalogsys']['catalogsysid'] > 0) {
$model = $this->loadModel($_POST['Catalogsys']['catalogsysid']);
$model->languageid = $_POST['Catalogsys']['languageid'];
$model->catalogname = $_POST['Catalogsys']['catalogname'];
$model->catalogval = $_POST['Catalogsys']['catalogval'];
$model->recordstatus = $_POST['Catalogsys']['recordstatus'];
} else {
$model = new Catalogsys();
$model->attributes = $_POST['Catalogsys'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Catalogsys']['catalogsysid']);
$this->GetSMessage('sctinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例9: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Groupmenuauth'])) {
$messages = $this->ValidateData(array(array($_POST['Groupmenuauth']['groupaccessid'], 'emptygroupname', 'emptystring'), array($_POST['Groupmenuauth']['menuauthidid'], 'emptymenuauth', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Groupmenuauth'];
if ((int) $_POST['Groupmenuauth']['groupmenuid'] > 0) {
$model = $this->loadModel($_POST['Groupmenuauth']['groupmenuid']);
$model->groupaccessid = $_POST['Groupmenuauth']['groupaccessid'];
$model->menuaccessid = $_POST['Groupmenuauth']['menuaccessid'];
$model->isread = $_POST['Groupmenuauth']['isread'];
$model->iswrite = $_POST['Groupmenuauth']['iswrite'];
$model->ispost = $_POST['Groupmenuauth']['ispost'];
$model->isreject = $_POST['Groupmenuauth']['isreject'];
$model->isupload = $_POST['Groupmenuauth']['isupload'];
$model->isdownload = $_POST['Groupmenuauth']['isdownload'];
} else {
$model = new Groupmenuauth();
$model->attributes = $_POST['Groupmenuauth'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Groupmenuauth']['groupmenuid']);
$this->GetSMessage('sogmnsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例10: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Paymentmethod'])) {
$messages = $this->ValidateData(array(array($_POST['Paymentmethod']['paycode'], 'aapemptypaycode', 'emptystring'), array($_POST['Paymentmethod']['paymentname'], 'aapemptypaymentname', 'emptystring'), array($_POST['Paymentmethod']['paydays'], 'aapemptypaydays', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Paymentmethod'];
if ((int) $_POST['Paymentmethod']['paymentmethodid'] > 0) {
$model = $this->loadModel($_POST['Paymentmethod']['paymentmethodid']);
$model->paycode = $_POST['Paymentmethod']['paycode'];
$model->paymentname = $_POST['Paymentmethod']['paymentname'];
$model->paydays = $_POST['Paymentmethod']['paydays'];
$model->recordstatus = $_POST['Paymentmethod']['recordstatus'];
} else {
$model = new Paymentmethod();
$model->attributes = $_POST['Paymentmethod'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Paymentmethod']['paymentmethodid']);
$this->GetSMessage('aapinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例11: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Splettertype'])) {
$messages = $this->ValidateData(array(array($_POST['Splettertype']['splettername'], 'hmsptemptysplettername', 'emptystring'), array($_POST['Splettertype']['description'], 'hmsptemptydescription', 'emptystring'), array($_POST['Splettertype']['validperiod'], 'hmsptemptyvalidperiod', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Splettertype'];
if ((int) $_POST['Splettertype']['splettertypeid'] > 0) {
$model = $this->loadModel($_POST['Splettertype']['splettertypeid']);
$model->splettername = $_POST['Splettertype']['splettername'];
$model->description = $_POST['Splettertype']['description'];
$model->validperiod = $_POST['Splettertype']['validperiod'];
$model->recordstatus = $_POST['Splettertype']['recordstatus'];
} else {
$model = new Splettertype();
$model->attributes = $_POST['Splettertype'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Splettertype']['splettertypeid']);
$this->GetSMessage('hrmbtinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例12: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Subdistrict'])) {
$messages = $this->ValidateData(array(array($_POST['Subdistrict']['cityid'], 'emptycityname', 'emptystring'), array($_POST['Subdistrict']['subdistrictname'], 'emptysubdistrict', 'emptystring'), array($_POST['Subdistrict']['zipcode'], 'emptyzipcode', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Subdistrict'];
if ((int) $_POST['Subdistrict']['subdistrictid'] > 0) {
$model = $this->loadModel($_POST['Subdistrict']['subdistrictid']);
$model->cityid = $_POST['Subdistrict']['cityid'];
$model->subdistrictname = $_POST['Subdistrict']['subdistrictname'];
$model->zipcode = $_POST['Subdistrict']['zipcode'];
$model->recordstatus = $_POST['Subdistrict']['recordstatus'];
} else {
$model = new Subdistrict();
$model->attributes = $_POST['Subdistrict'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Subdistrict']['subdistrictid']);
$this->GetSMessage('ccsdinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例13: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Menuauth'])) {
$messages = $this->ValidateData(array(array($_POST['Menuauth']['menuaccessid'], 'emptymenuname', 'emptystring'), array($_POST['Menuauth']['menuobject'], 'emptymenuobject', 'emptystring')));
if ($messages == '') {
if ((int) $_POST['Menuauth']['menuauthid'] > 0) {
$model = $this->loadModel($_POST['Menuauth']['menuauthid']);
$model->menuaccessid = $_POST['Menuauth']['menuaccessid'];
$model->menuobject = $_POST['Menuauth']['menuobject'];
$model->recordstatus = $_POST['Menuauth']['recordstatus'];
} else {
$model = new Menuauth();
$model->attributes = $_POST['Menuauth'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Menuauth']['menuauthid']);
$this->GetSMessage('sumansertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例14: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Romawi'])) {
$messages = $this->ValidateData(array(array($_POST['Romawi']['monthcal'], 'emptycalendarmonth', 'emptystring'), array($_POST['Romawi']['monthrm'], 'emptyromemonth', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Romawi'];
if ((int) $_POST['Romawi']['romawiid'] > 0) {
$model = $this->loadModel($_POST['Romawi']['romawiid']);
$model->monthcal = $_POST['Romawi']['monthcal'];
$model->monthrm = $_POST['Romawi']['monthrm'];
$model->recordstatus = $_POST['Romawi']['recordstatus'];
} else {
$model = new Romawi();
$model->attributes = $_POST['Romawi'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Romawi']['romawiid']);
$this->GetSMessage('croinsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}
示例15: actionWrite
public function actionWrite()
{
parent::actionWrite();
if (isset($_POST['Purchasinggroup'])) {
$messages = $this->ValidateData(array(array($_POST['Purchasinggroup']['purchasingorgid'], 'emptypurchasingorg', 'emptystring'), array($_POST['Purchasinggroup']['purchasinggroupcode'], 'emptypurchasinggroupcode', 'emptystring'), array($_POST['Purchasinggroup']['description'], 'emptydescription', 'emptystring')));
if ($messages == '') {
//$dataku->attributes=$_POST['Purchasinggroup'];
if ((int) $_POST['Purchasinggroup']['purchasinggroupid'] > 0) {
$model = $this->loadModel($_POST['Purchasinggroup']['purchasinggroupid']);
$model->purchasinggroupcode = $_POST['Purchasinggroup']['purchasinggroupcode'];
$model->purchasingorgid = $_POST['Purchasinggroup']['purchasingorgid'];
$model->description = $_POST['Purchasinggroup']['description'];
$model->recordstatus = $_POST['Purchasinggroup']['recordstatus'];
} else {
$model = new Purchasinggroup();
$model->attributes = $_POST['Purchasinggroup'];
}
try {
if ($model->save()) {
$this->DeleteLock($this->menuname, $_POST['Purchasinggroup']['purchasinggroupid']);
$this->GetSMessage('ppginsertsuccess');
} else {
$this->GetMessage($model->getErrors());
}
} catch (Exception $e) {
$this->GetMessage($e->getMessage());
}
}
}
}