public function actionWrite()
 {
     parent::actionWrite();
     if (isset($_POST['Bank'])) {
         $messages = $this->ValidateData(array(array($_POST['Bank']['fullname'], 'mmsemptyfullname', 'emptystring')));
         if ($messages == '') {
             if ((int) $_POST['Bank']['addressbookid'] > 0) {
                 $model = $this->loadModel($_POST['Bank']['addressbookid']);
                 $model->fullname = $_POST['Bank']['fullname'];
                 $model->taxno = $_POST['Bank']['taxno'];
                 $model->accpiutangid = $_POST['Bank']['accpiutangid'];
                 $model->fullname = $_POST['Bank']['fullname'];
                 $model->recordstatus = $_POST['Bank']['recordstatus'];
             } else {
                 $model = new Bank();
                 $model->isbank = 1;
                 $model->attributes = $_POST['Bank'];
             }
             try {
                 if ($model->save()) {
                     $this->DeleteLock($this->menuname, $_POST['Bank']['addressbookid']);
                     $this->GetSMessage('mmsinsertsuccess');
                 } else {
                     $this->GetMessage($model->getErrors());
                 }
             } catch (Exception $e) {
                 $this->GetMessage($e->getMessage());
             }
         }
     }
 }