Ejemplo n.º 1
0
    public void AddBranchFunction()
    {
        BranchFunction function = ScriptableObject.CreateInstance <BranchFunction>();

        AddTreeFunction(function);

        GenerateTree();
    }
        /// <summary>
        /// Delete the Branch Function
        /// </summary>
        /// <param name="entity"></param>
        public void DeleteBranchFunction(BranchFunction entity)
        {
            IQueryable<Permission> query = from permissions in DbContext.Permissions
                                           join company in DbContext.Companies on permissions.CompanyId equals
                                               company.CompanyId
                                           where company.LegalEntityProfile.BranchId == entity.BranchId
                                           select permissions;
            DbContext.Permissions.DeleteAllOnSubmit(query);
            DbContext.SubmitChanges();

            DbContext.BranchFunctions.Attach(entity);
            DbContext.BranchFunctions.DeleteOnSubmit(entity);
            DbContext.SubmitChanges();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Delete the Branch Function
        /// </summary>
        /// <param name="entity"></param>
        public void DeleteBranchFunction(BranchFunction entity)
        {
            IQueryable <Permission> query = from permissions in DbContext.Permissions
                                            join company in DbContext.Companies on permissions.CompanyId equals
                                            company.CompanyId
                                            where company.LegalEntityProfile.BranchId == entity.BranchId
                                            select permissions;

            DbContext.Permissions.DeleteAllOnSubmit(query);
            DbContext.SubmitChanges();

            DbContext.BranchFunctions.Attach(entity);
            DbContext.BranchFunctions.DeleteOnSubmit(entity);
            DbContext.SubmitChanges();
        }
 /// <summary>
 /// Inserts the Branch Function
 /// </summary>
 /// <param name="entity"></param>
 public void InsertBranchFunction(BranchFunction entity)
 {
     DbContext.BranchFunctions.InsertOnSubmit(entity);
     DbContext.SubmitChanges();
 }
 public BranchedCache(BranchFunction <TEntity, T1, T2> branchFunction)
 {
     this.branchFunction = branchFunction;
 }
 public BranchingCache(BranchFunction <TEntity, T1, T2, T3, T4, T5> branchFunction)
 {
     this.branchFunction = branchFunction;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Inserts the Branch Function
 /// </summary>
 /// <param name="entity"></param>
 public void InsertBranchFunction(BranchFunction entity)
 {
     DbContext.BranchFunctions.InsertOnSubmit(entity);
     DbContext.SubmitChanges();
 }