Exemplo n.º 1
0
 /**
  * @Author: ANH DUNG Aug 05, 2014
  * @Todo: CompanyEditContact at grid
  * @Param: $id list id 1,2,3 ...
  */
 public function actionCompanyEditContact($id)
 {
     try {
         $model = new Listing();
         $id = $this->FormatListId($id);
         $aModelListing = Listing::GetModelByListId($id);
         if (isset($_POST['Listing']) && is_array($_POST['Listing']['contact_name_no'])) {
             Listing::UpdateModelByListId();
             die('<script type="text/javascript">parent.$.fn.colorbox.close(); parent.$.fn.yiiGridView.update("listing-company-grid");</script>');
         }
         $this->render('CompanyEditContact', array('model' => $model, 'aModelListing' => $aModelListing, 'actions' => $this->listActionsCanAccess));
     } catch (Exception $exc) {
         echo $exc->getMessage();
         die;
     }
 }
Exemplo n.º 2
0
 /**
  * Render popup dialog to change Telemarketer of listings
  * 
  * @author Lam Huynh
  */
 public function actionUpdateTelemarketer($id)
 {
     $model = new Listing();
     $id = explode('-', trim($id, '-'));
     $aModelListing = Listing::GetModelByListId($id);
     if (isset($_POST['Listing'])) {
         Listing::massUpdateTelemarketer($_POST['Listing']);
         die('<script type="text/javascript">parent.$.fn.colorbox.close(); parent.$.fn.yiiGridView.update("listing-company-grid");</script>');
     }
     $this->renderPartial('update-telemarketer', array('model' => $model, 'aModelListing' => $aModelListing, 'actions' => $this->listActionsCanAccess));
 }