Beispiel #1
0
 public static function getOptions()
 {
     $model = Farmer::model()->findAll();
     $arr = array();
     foreach ($model as $r) {
         $arr[$r->farmer_id] = $r->farmer_name;
     }
     return $arr;
 }
Beispiel #2
0
 function actionFarmerDelete($id)
 {
     $this->checkLogin();
     Farmer::model()->deleteByPk((int) $id);
     $this->redirect(array('FarmerIndex'));
 }