void ChooseViewVariantAction_ExecuteCompleted(object sender, ActionBaseEventArgs e)
 {
     if (e.ShowViewParameters.CreatedView.ObjectTypeInfo.Type == typeof(Orders))
     {
         SingleChoiceAction changeVariantAction = Frame.GetController <ChangeVariantController>().ChangeVariantAction;
         if (changeVariantAction.SelectedIndex == 0)
         {
             changeVariantAction.DoExecute(changeVariantAction.Items[1]);
         }
         else
         {
             changeVariantAction.DoExecute(changeVariantAction.Items[0]);
         }
     }
 }
Exemplo n.º 2
0
 public void ExecuteAction()
 {
     if (CurrentAction.Active && CurrentAction.Enabled)
     {
         CurrentAction.DoExecute(ActionItem);
     }
 }
Exemplo n.º 3
0
        private void SimpleAction_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            var selectedItem = e.Action.Tag as ChoiceActionItem;

            if (selectedItem == null)
            {
                return;
            }
            stateMachineAction.DoExecute(selectedItem);
        }
Exemplo n.º 4
0
 public void ProcessAction(string parameter)
 {
     if (SingleChoiceAction.Active && SingleChoiceAction.Enabled)
     {
         ChoiceActionItem item = SingleChoiceAction.FindItemByIdPath(parameter);
         if (item != null)
         {
             SingleChoiceAction.DoExecute(item);
         }
     }
 }
Exemplo n.º 5
0
 void showNavigationItemController_CustomShowNavigationItem(object sender, CustomShowNavigationItemEventArgs e)
 {
     if (e.ActionArguments.SelectedChoiceActionItem.Id == "NewTaskExtraNav")
     {
         SingleChoiceAction newObjectAction = Frame.GetController <NewObjectViewController>().NewObjectAction;
         newObjectAction.DoExecute(new ChoiceActionItem()
         {
             Data = typeof(TaskExtra)
         });
         e.Handled = true;
     }
 }
 protected virtual void UpdateCurrentViewVariant(string selectedViewId)
 {
     if (changeVariantController != null)
     {
         SingleChoiceAction action       = changeVariantController.ChangeVariantAction;
         ChoiceActionItem   selectedItem = action.Items.FindItemByID(selectedViewId);
         if (selectedItem != null)
         {
             action.DoExecute(selectedItem);
         }
     }
 }
Exemplo n.º 7
0
        public void DoExecuteOnActivated(ViewController controller, SingleChoiceAction action,
                                         ChoiceActionItem choice)
        {
            EventHandler executeHandler = (sender, e) =>
            {
                action.DoExecute(choice);
            };

            controller.Activated   += executeHandler;
            controller.Deactivated += (sender, e) =>
            {
                controller.Activated -= executeHandler;
            };
        }
 protected void AutoSelectFirstItemInGroup(ChoiceActionItem navGroupItem)
 {
     if (!CanAutoSelectFirstItemInGroup())
     {
         return;
     }
     foreach (ChoiceActionItem item in navGroupItem.Items)
     {
         if (item.Enabled.ResultValue && item.Active.ResultValue)
         {
             _navigationAction.DoExecute(item);
             return;
         }
     }
 }
Exemplo n.º 9
0
        protected override void OnActivated()
        {
            filteringCriterionAction.Items.Clear();
            foreach (CriteriosDeFiltro criterion in ObjectSpace.GetObjects <CriteriosDeFiltro>())
            {
                if (criterion.TipodeDatos.IsAssignableFrom(View.ObjectTypeInfo.Type))
                {
                    filteringCriterionAction.Items.Add(
                        new ChoiceActionItem(criterion.Descripcion, criterion.Criterio));
                }
            }
            if (filteringCriterionAction.Items.Count > 0)
            {
                filteringCriterionAction.Items.Add(new ChoiceActionItem("Todos los Registros", null));
            }

            string   propertyName = "Fecha";
            ListView vw           = null;

            if (View.GetType().ToString().Contains("VST") == false)
            {
                if (View.GetType().ToString().Contains("ListView"))
                {
                    if (View.GetType().ToString().Contains("Collection") == false)
                    {
                        vw = View as XpandListView;
                        IModelColumn columnInfo = ((IModelList <IModelColumn>)vw.Model.Columns)[propertyName];
                        if (columnInfo != null)
                        {
                            filteringCriterionAction.Items.Clear();
                            filteringCriterionAction.Items.Add(new ChoiceActionItem("Este Mes", "GetMonth([Fecha]) = GetMonth(Now()) AND GetYear([Fecha])=GetYear(Now())"));
                            filteringCriterionAction.Items.Add(new ChoiceActionItem("Este Mes y Mes Pasado", "GetMonth([Fecha]) >= GetMonth(Now())-1 AND GetMonth([Fecha]) <= GetMonth(Now()) AND GetYear([Fecha])=GetYear(Now())"));
                            filteringCriterionAction.Items.Add(new ChoiceActionItem("Este Año", "GetYear([Fecha])=GetYear(Now())"));
                            filteringCriterionAction.Items.Add(new ChoiceActionItem("Todos los Registros", ""));
                            //Quita los demas registros es a nivel de datasource
                            //View.CollectionSource.Criteria["Este Mes"] = CriteriaOperator.Parse("GetMonth([Fecha])=GetMonth(Now()) and GetYear([Fecha])=GetYear(Now())");
                            filteringCriterionAction.SelectedIndex = 0;
                            filteringCriterionAction.DoExecute(filteringCriterionAction.SelectedItem);
                        }
                    }
                }
            }
        }
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            SystemUsers user = (SystemUsers)SecuritySystem.CurrentUser;

            if (View is ListView)
            {
                bool   filterrolefound = false;
                string description1st  = "";
                string description     = "";

                filteringCriterionAction.Items.Clear();
                foreach (FilteringCriterion criterion in ObjectSpace.GetObjects <FilteringCriterion>())
                {
                    if (criterion.ObjectType.IsAssignableFrom(View.ObjectTypeInfo.Type))
                    {
                        if (criterion.Roles.Count <= 0)
                        {
                            if (criterion.Description == "-")
                            {
                                description    = "Default";
                                description1st = description;
                            }
                            else
                            {
                                description = criterion.Description;
                            }

                            filteringCriterionAction.Items.Add(
                                new ChoiceActionItem(description, criterion.Criterion));

                            if (description1st == "")
                            {
                                description1st = description;
                            }
                        }
                        else
                        {
                            filterrolefound = false;
                            foreach (IPermissionPolicyRole role in user.Roles)
                            {
                                if (!filterrolefound)
                                {
                                    if (criterion.Roles.Where(p => p.FilterRole.Name == role.Name).Count() > 0)
                                    {
                                        filterrolefound = true;
                                        if (criterion.Description == "-")
                                        {
                                            description    = "Default";
                                            description1st = description;
                                        }
                                        else
                                        {
                                            description = criterion.Description;
                                        }

                                        filteringCriterionAction.Items.Add(
                                            new ChoiceActionItem(description, criterion.Criterion));

                                        if (description1st == "")
                                        {
                                            description1st = description;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                filteringCriterionAction.SelectedItem = filteringCriterionAction.Items.FindItemByID(description1st);
                if (filteringCriterionAction.SelectedItem != null)
                {
                    filteringCriterionAction.DoExecute(filteringCriterionAction.SelectedItem);
                }
            }
        }
Exemplo n.º 11
0
        protected override void OnActivated()
        {
            base.OnActivated();
            // Perform various tasks depending on the target View.
            if (View is ListView)
            {
                if (View.IsRoot)
                {
                    SystemUsers user             = (SystemUsers)SecuritySystem.CurrentUser;
                    bool        IsClaimUser      = user.Roles.Where(p => p.Name == GeneralSettings.claimrole).Count() > 0 ? true : false;
                    bool        IsClaimSuperUser = user.Roles.Where(p => p.Name == GeneralSettings.claimsuperrole).Count() > 0 ? true : false;
                    bool        IsAcceptanceUser = user.Roles.Where(p => p.Name == GeneralSettings.Acceptancerole).Count() > 0 ? true : false;
                    bool        IsVerifyUser     = user.Roles.Where(p => p.Name == GeneralSettings.verifyrole).Count() > 0 ? true : false;
                    bool        IsPostUser       = user.Roles.Where(p => p.Name == GeneralSettings.postrole).Count() > 0 ? true : false;
                    bool        IsApprovalUser   = user.Roles.Where(p => p.Name == GeneralSettings.ApprovalRole).Count() > 0 ? true : false;

                    Employees employee = ObjectSpace.FindObject <Employees>(CriteriaOperator.Parse("SystemUser.Oid=?", user.Oid));

                    #region filteringcreterion
                    bool   filterrolefound = false;
                    string description1st  = "";
                    string description     = "";

                    filteringCriterionAction.Items.Clear();
                    foreach (FilteringCriterion criterion in ObjectSpace.GetObjects <FilteringCriterion>().OrderBy(p => p.Remarks))
                    {
                        if (criterion.ObjectType == null)
                        {
                            continue;
                        }

                        if (criterion.ObjectType.IsAssignableFrom(View.ObjectTypeInfo.Type))
                        {
                            if (criterion.Roles.Count <= 0)
                            {
                                if (criterion.Description == "-")
                                {
                                    description    = "Default";
                                    description1st = description;
                                }
                                else
                                {
                                    description = criterion.Description;
                                }

                                filteringCriterionAction.Items.Add(
                                    new ChoiceActionItem(description, criterion.Criterion));

                                if (description1st == "")
                                {
                                    description1st = description;
                                }
                            }
                            else
                            {
                                filterrolefound = false;
                                foreach (IPermissionPolicyRole role in user.Roles)
                                {
                                    if (!filterrolefound)
                                    {
                                        if (criterion.Roles.Where(p => p.FilterRole.Name == role.Name).Count() > 0)
                                        {
                                            filterrolefound = true;
                                            if (criterion.Description == "-")
                                            {
                                                description    = "Default";
                                                description1st = description;
                                            }
                                            else
                                            {
                                                description = criterion.Description;
                                            }

                                            filteringCriterionAction.Items.Add(
                                                new ChoiceActionItem(description, criterion.Criterion));

                                            if (description1st == "")
                                            {
                                                description1st = description;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    filteringCriterionAction.SelectedItem = filteringCriterionAction.Items.FindItemByID(description1st);
                    if (filteringCriterionAction.SelectedItem != null)
                    {
                        filteringCriterionAction.DoExecute(filteringCriterionAction.SelectedItem);
                    }
                    #endregion

                    /*
                     * if (View.Id == "ClaimTrxs_ListView")
                     * {
                     *  if (IsClaimSuperUser || IsApprovalUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("Not IsCancelled");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("Not IsCancelled");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     * else if (View.Id == "ClaimTrxs_ListView_Cancelled")
                     * {
                     *  if (IsClaimSuperUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsCancelled");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsCancelled");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     * else if (View.Id == "ClaimTrxs_ListView_Rejected")
                     * {
                     *  if (IsClaimSuperUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsRejected and not IsCancelled");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsRejected and not IsCancelled");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     * else if (View.Id == "ClaimTrxs_ListView_Passed")
                     * {
                     *  if (IsClaimSuperUser || IsAcceptanceUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsPassed and not IsAccepted");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsPassed and not IsAccepted");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     * else if (View.Id == "ClaimTrxs_ListView_Accepted")
                     * {
                     *  if (IsClaimSuperUser || IsVerifyUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsAccepted and not IsClosed");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsAccepted and not IsClosed");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     * else if (View.Id == "ClaimTrxs_ListView_Closed")
                     * {
                     *  if (IsClaimSuperUser || IsPostUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsClosed and not IsPosted");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsClosed and not IsPosted");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     * else if (View.Id == "ClaimTrxs_ListView_Posted")
                     * {
                     *  if (IsClaimSuperUser || IsPostUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsPosted");
                     *  }
                     *  else if (IsClaimUser)
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("IsPosted");
                     *      ((ListView)View).CollectionSource.Criteria["Filter2"] = CriteriaOperator.Parse("CreateUser.Oid=?", user.Oid);
                     *  }
                     *  else
                     *  {
                     *      ((ListView)View).CollectionSource.Criteria["Filter1"] = CriteriaOperator.Parse("1=0");
                     *  }
                     * }
                     */
                }
                else if (View.IsRoot == false) // nested listview
                {
                    if (typeof(FilteringCriterionRole) == View.ObjectTypeInfo.Type)
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(SystemUsers))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyUser))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(DevExpress.Persistent.BaseImpl.PermissionPolicy.PermissionPolicyRole))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(ClaimTrxDetails))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(ClaimTrxAttachments))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", true);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", true);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(ClaimTrxDetailNotes))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", true);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", true);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(ClaimTrxMileages))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", true);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", true);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(ClaimTrxPostDetails))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", true);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", true);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(ClaimTrxDocStatuses))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(MileageDetails))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", true);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", true);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(SystemUsers))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Approvals))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Positions))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Projects))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Departments))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Divisions))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Brands))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Currencies))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(Employees))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(BudgetMasters))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", true);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", true);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                    if (View.ObjectTypeInfo.Type == typeof(CompanyDocs))
                    {
                        Frame.GetController <LinkUnlinkController>().LinkAction.Active.SetItemValue("", false);
                        Frame.GetController <LinkUnlinkController>().UnlinkAction.Active.SetItemValue("", false);
                        Frame.GetController <DeleteObjectsViewController>().DeleteAction.Active.SetItemValue("", false);
                        Frame.GetController <NewObjectViewController>().NewObjectAction.Active.SetItemValue("", false);
                    }
                }
            }
        }