Exemplo n.º 1
0
 function action_Remove()
 {
     PermissionHelper::Verification('Editor');
     $unit_id = $_GET['id'];
     $unit = UnitService::GetById($unit_id);
     UnitService::Delete($unit);
     header("Location: /Unit/item");
 }
Exemplo n.º 2
0
 public function action_remove()
 {
     PermissionHelper::Verification('Editor');
     $id = $_GET['id'];
     $review = ReviewService::GetById($id);
     ReviewService::Delete($review);
     header("Location: /Review/item");
 }
Exemplo n.º 3
0
 function action_Remove()
 {
     PermissionHelper::Verification('Editor');
     $section_id = $_GET['id'];
     $section = SectionService::GetById($section_id);
     CatalogueService::Delete($section);
     header("Location: /section/item");
 }
 function action_Remove()
 {
     PermissionHelper::Verification('Editor');
     $group_id = $_GET['id'];
     $group = AttributeGroupService::GetById($group_id);
     AttributeGroupService::Delete($group);
     header("Location: /AttributeGroup/item");
 }
Exemplo n.º 5
0
 public function action_new()
 {
     PermissionHelper::Verification('Editor');
     $roleName = $_POST['roleName'];
     $userName = $_POST['userName'];
     $model = new UserRole();
     $model->user_id = UserService::GetByName($userName)->user_id;
     $model->role_id = RoleService::GetByName($roleName)->role_id;
     UserRoleService::Create($model);
     header('Location: /Role/item');
 }
Exemplo n.º 6
0
 public function action_NewStatus()
 {
     PermissionHelper::Verification('Editor');
     $name = $_POST['InputStatus'];
     $order_id = $_POST['id'];
     $order = OrderService::GetById($order_id);
     $oldStatus = $order->statusorder_id;
     $order->statusorder_id = StatusService::GetByName($name)->statusorder_id;
     OrderService::Save($order);
     header("Location: /Order/Item?id=" . $oldStatus);
 }
Exemplo n.º 7
0
 function action_new()
 {
     PermissionHelper::Verification('Editor');
     $name = $_POST['inputName'];
     $sectionName = $_POST['inputSection'];
     $attribute = $_POST['attributes'];
     $catalogue = new Catalogue();
     $catalogue->name = $name;
     $catalogue->section_id = SectionService::GetByName($sectionName)->section_id;
     CatalogueService::Create($catalogue);
     $catalogue = CatalogueService::GetByName($name);
     for ($i = 0; $i < count($attribute); $i++) {
         $value = new CatalogueAttribute();
         $value->catalogue_id = $catalogue->catalogue_id;
         $value->attribute_id = AttributeService::GetByName(trim($attribute[$i]))->attribute_id;
         CatalogueAttributeService::Create($value);
     }
     header("Location: /Catalog/Item");
 }
Exemplo n.º 8
0
 function action_remove()
 {
     PermissionHelper::Verification('Editor');
     $tovarId = $_GET['tovarId'];
     ProductService::Delete(ProductService::GetById($tovarId));
     header("Location: /product/itemadmin");
 }
Exemplo n.º 9
0
 public function action_Remove()
 {
     PermissionHelper::Verification('Editor');
     $id = $_GET['id'];
     AttributeService::Delete(AttributeService::GetById($id));
     header("Location: /Attribute/Item");
 }