Exemplo n.º 1
0
        private void RemoveRoleItem(AuthRole _obj)
        {
            DbDeleteStatement statement = DbMgr.CreateDeleteClause();

            statement.DeleteFrom("AuthRoleItem").Criteria.IsEqual("AuthRoleItem", "RoleID", _obj.RoleID);
            ExecuteNonQuery(statement);
        }
Exemplo n.º 2
0
        public void Delete(int UserID)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("AuthUser").Criteria.IsEqual("AuthUser", "AuthUserID", UserID);
            ExecuteNonQuery(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(ServiceSaleLine _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("ServiceSaleLines").Criteria.IsEqual("ServiceSaleLines", "ServiceSaleLineID", _obj.ServiceSaleLineID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(Customer _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("Customers").Criteria.IsEqual("Customers", "CustomerID", _obj.CustomerID);

            return(clause);
        }
Exemplo n.º 5
0
        private DbDeleteStatement GetQuery_DeleteQuery(GeneralJournalLine _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("GeneralJournalLines").Criteria.IsEqual("GeneralJournalLines", "GeneralJournalLineID", _obj.GeneralJournalLineID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(RecurringPurchase _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("RecurringPurchases").Criteria.IsEqual("RecurringPurchases", "RecurringPurchaseID", _obj.RecurringPurchaseID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(ProfessionalSaleLine _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("ProfessionalSaleLines").Criteria.IsEqual("ProfessionalSaleLines", "ProfessionalSaleLineID", _obj.ProfessionalSaleLineID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(Address _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("Address").Criteria.IsEqual("Address", "AddressID", _obj.AddressID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(RecurringGeneralJournal _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("RecurringGeneralJournals").Criteria.IsEqual("RecurringGeneralJournals", "RecurringGeneralJournalID", _obj.RecurringGeneralJournalID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(MiscPurchaseLine _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("MiscPurchaseLines").Criteria.IsEqual("MiscPurchaseLines", "MiscPurchaseLineID", _obj.MiscPurchaseLineID);

            return(clause);
        }
Exemplo n.º 11
0
        private DbDeleteStatement GetQuery_DeleteQuery(PersonalCard _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("PersonalCards").Criteria.IsEqual("PersonalCards", "PersonalCardID", _obj.PersonalCardID);

            return(clause);
        }
        private DbDeleteStatement GetQuery_DeleteQuery(Employee _obj)
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            clause.DeleteFrom("Employees").Criteria.IsEqual("Employees", "EmployeeID", _obj.EmployeeID);

            return(clause);
        }
Exemplo n.º 13
0
 protected override OpResult _Delete(DataField _obj)
 {
     if (Exists(_obj))
     {
         DbDeleteStatement clause = DbMgr.CreateDeleteClause();
         clause.DeleteFrom("DataFields").Criteria.IsEqual("DataFields", "DataFieldID", _obj.DataFieldID);
         DbMgr.ExecuteNonQuery(clause);
         return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.ExistsAndDeleted, _obj));
     }
     return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.NotExists, _obj, "DataField object does not exist"));
 }
Exemplo n.º 14
0
 protected override OpResult _Delete(ItemDataFieldEntry _obj)
 {
     if (Exists(_obj))
     {
         DbDeleteStatement clause = DbMgr.CreateDeleteClause();
         clause.DeleteFrom("ItemDataFieldEntries").Criteria.IsEqual("ItemDataFieldEntries", "ItemDataFieldEntryID", _obj.ItemDataFieldEntryID);
         DbMgr.ExecuteNonQuery(clause);
         return OpResult.NotifyDeleteAction(OpResult.ResultStatus.ExistsAndDeleted, _obj);
     }
     return OpResult.NotifyDeleteAction(OpResult.ResultStatus.NotExists, _obj);
 }
        protected override OpResult _Delete(Config _obj)
        {
            if (Exists(_obj))
            {
                DbDeleteStatement clause = DbMgr.CreateDeleteClause();
                clause.DeleteFrom("Configs").Criteria
                .IsEqual("Configs", "ConfigName", _obj.ConfigName);

                DbMgr.ExecuteNonQuery(clause);
                return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.ExistsAndDeleted, _obj));
            }
            return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.NotExists, _obj));
        }
 protected override OpResult _Delete(MiscNumber _obj)
 {
     if (Exists(_obj))
     {
         DbDeleteStatement clause = DbMgr.CreateDeleteClause();
         clause.DeleteFrom("NumberGenerator").Criteria
         .IsEqual("NumberGenerator", "signature", _obj.signature)
         .IsEqual("NumberGenerator", "type", (int)_obj.type);
         DbMgr.ExecuteNonQuery(clause);
         return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.ExistsAndDeleted, _obj));
     }
     return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.NotExists, _obj, "MiscNumber object does not exists"));
 }
Exemplo n.º 17
0
        protected override OpResult _Delete(Alert _obj)
        {
            if (Exists(_obj))
            {
                DbDeleteStatement clause = DbMgr.CreateDeleteClause();
                clause.DeleteFrom("Alerts").Criteria
                .IsEqual("Alerts", "AlertID", _obj.AlertID);

                DbMgr.ExecuteNonQuery(clause);
                return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.ExistsAndDeleted, _obj));
            }
            return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.NotExists, _obj, "Alert object cannot be deleted as it does not exist"));
        }
Exemplo n.º 18
0
        protected override OpResult _Delete(AuthRole _obj)
        {
            RemoveRoleItem(_obj);
            RemoveRoleRole(_obj);

            DbDeleteStatement statement = DbMgr.CreateDeleteClause();

            statement.DeleteFrom("AuthRole").Criteria.IsEqual("AuthRole", "RoleID", _obj.RoleID);
            ExecuteNonQuery(statement);

            statement = DbMgr.CreateDeleteClause();
            statement.DeleteFrom("AuthRoleRole").Criteria.IsEqual("AuthRoleRole", "ChildRoleID", _obj.RoleID);
            ExecuteNonQuery(statement);

            statement = DbMgr.CreateDeleteClause();
            statement.DeleteFrom("AuthUser").Criteria.IsEqual("AuthUser", "RoleID", _obj.RoleID);
            ExecuteNonQuery(statement);

            return(OpResult.NotifyDeleteAction(OpResult.ResultStatus.ExistsAndDeleted, _obj));
        }
Exemplo n.º 19
0
        public virtual void CleanAuthUserSchema()
        {
            DbDeleteStatement clause = DbMgr.CreateDeleteClause();

            ExecuteNonQuery(clause.DeleteFrom("AuthUser"));
        }