Пример #1
0
 public function btnInventorySearchToolAdd_Click()
 {
     $intSelectedInventoryModelId = $this->ctlInventorySearchTool->ctlInventorySearch->dtgInventoryModel->GetSelected("InventoryId");
     if (count($intSelectedInventoryModelId) > 1) {
         $this->ctlInventorySearchTool->lblWarning->Text = "You must select only one inventory.";
     } elseif (count($intSelectedInventoryModelId) != 1) {
         $this->ctlInventorySearchTool->lblWarning->Text = "No selected inventories.";
     } elseif ($objInventoryModel = InventoryModel::LoadByInventoryModelId($intSelectedInventoryModelId[0])) {
         $this->txtNewInventoryModelCode->Text = $objInventoryModel->InventoryModelCode;
         $this->ctlInventorySearchTool->dlgInventorySearchTool->HideDialogBox();
         $this->txtQuantity->SetFocus();
     }
     // Uncheck all items but SelectAll checkbox
     $this->UncheckAllItems();
 }