public int DelBusinessData(int ID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { // 先删详情 List <SYS_BUSINESSDATADETAIL> details = orm.Query <SYS_BUSINESSDATADETAIL>("where ref_businessdata_id=" + ID); foreach (SYS_BUSINESSDATADETAIL detail in details) { orm.Delete <SYS_BUSINESSDATADETAIL>("where ID=" + detail.ID); } //再删业务数据 return(orm.Delete <SYS_BUSINESSDATA>("where ID=" + ID)); } }
public int DelConfig(int ConfigId) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <SYS_SYSTEMCONFIG>("where ID=" + ConfigId)); } }
public int DelBusiness(int ID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <SYS_BUSINESS>("where ID=" + ID)); } }
public int DelMetaDataDetail(int ID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <SYS_METADATADETAIL>("where ID=" + ID)); } }
public int DelBusinessMaterial(int MaterialID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <SYS_BUSINESSMATERIAL>("where ID=" + MaterialID)); } }
public int DelBusinessRole(int RoleId) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <SYS_BUSINESSROLE>("where ID=" + RoleId)); } }
public int DelUserOrg(int UserOrgId) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <ORUP_ORGANIZATION>("where ID=" + UserOrgId)); } }
public int DelUser(int UserId) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <ORUP_USER>("where ID=" + UserId)); } }
public int DelRole(int RoleId) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Delete <ORUP_ROLE>("where ID=" + RoleId)); } }
/// <summary> /// 级联删除子业务数据详情 /// </summary> /// <param name="ID"></param> /// <param name="orm"></param> /// <returns></returns> int CascadeDelBusinessDataDetail(int ID, ORMHandler orm) { List <SYS_BUSINESSDATADETAIL> children = orm.Query <SYS_BUSINESSDATADETAIL>("where ParentID=" + ID); foreach (SYS_BUSINESSDATADETAIL temp in children) { CascadeDelBusinessDataDetail(temp.ID, orm); } return(orm.Delete <SYS_BUSINESSDATADETAIL>("where ID=" + ID)); }
public virtual void Delete(ORMHandler orm) { orm.Delete(this); }