public List <SYS_SYSTEMCONFIG> Configs() { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <SYS_SYSTEMCONFIG>()); } }
public List <SYS_BUSINESSPROCESS> BusinessProcesses(int BusinessID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <SYS_BUSINESSPROCESS>("where REF_BUSINESS_ID=" + BusinessID)); } }
public List <ORUP_USERROLE> GetUserRolesByUserID(int UserID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <ORUP_USERROLE>("where UserID=" + UserID)); } }
public List <ORUP_USERORGANIZATION> GetUserOrgsByUserID(int UserID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <ORUP_USERORGANIZATION>("where UserID=" + UserID)); } }
public List <ORUP_ORGANIZATION> Orgs() { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <ORUP_ORGANIZATION>()); } }
public List <ORUP_USER> Users() { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <ORUP_USER>()); } }
public List <SYS_BUSINESSROLE> BusinessRoles(int BusinessID) { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <SYS_BUSINESSROLE>("where REF_BUSINESS_ID=" + BusinessID + " order by SortIndex")); } }
public List <ORUP_ROLE> Roles() { using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { return(orm.Query <ORUP_ROLE>()); } }
public ActionResult Projectsing(SearchViewModel model) { List <SYS_PROJECT> list = null; string UserId = Session["UserId"].ToString(); using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { string whereClause = " where 1=1 "; whereClause += " and ID in (select ref_project_id from sys_projectworkitem where state=0) "; if (null != model.PROJECTNO) { whereClause += " and PROJECTNO like '%" + model.PROJECTNO + "%' "; } if (null != model.PROJECTNAME) { whereClause += " and PROJECTNAME like '%" + model.PROJECTNAME + "%' "; } if (null != model.BUILDORG) { whereClause += " and BUILDORG like '%" + model.BUILDORG + "%' "; } if (null != model.BUILDADRESS) { whereClause += " and BUILDADRESS like '%" + model.BUILDADRESS + "%' "; } if (null != model.CREATETIMESTART) { whereClause += " and CREATETIME >= to_date('" + model.CREATETIMESTART + "','yyyy-mm-dd') "; } if (null != model.CREATETIMEEND) { whereClause += " and CREATETIME <= to_date('" + model.CREATETIMEEND + "','yyyy-mm-dd') "; } if (null != model.ENDTIMESTART) { whereClause += " and ENDTIME >= to_date('" + model.ENDTIMESTART + "','yyyy-mm-dd') "; } if (null != model.ENDTIMEEND) { whereClause += " and ENDTIME <= to_date('" + model.ENDTIMEEND + "','yyyy-mm-dd') "; } list = orm.Query <SYS_PROJECT>(whereClause); } foreach (SYS_PROJECT prj in list) { prj._parentId = prj.PID; } var jss = new System.Web.Script.Serialization.JavaScriptSerializer(); System.Web.HttpContext.Current.Response.Write(jss.Serialize(new { rows = list })); System.Web.HttpContext.Current.Response.End(); return(Json(new { rows = list })); }
public List <SYS_BUSINESS> Businesses(int GroupID) { List <SYS_BUSINESS> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { list = orm.Query <SYS_BUSINESS>("where REF_GROUP_ID=" + GroupID + " order by SortIndex"); } return(list); }
public List <SYS_METADATADETAIL> MetaDataDetails(int MetaDataID) { List <SYS_METADATADETAIL> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { list = orm.Query <SYS_METADATADETAIL>("where REF_METADATA_ID=" + MetaDataID); } return(list); }
public List <SYS_BUSINESSGROUP> BusinessGroups() { List <SYS_BUSINESSGROUP> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { list = orm.Query <SYS_BUSINESSGROUP>(); } return(list); }
/// <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 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 List <SYS_PROJECT> Projectsing(string UserId) { List <SYS_PROJECT> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { list = orm.Query <SYS_PROJECT>("where ID in (select ref_project_id from sys_projectworkitem where ref_user_id = " + UserId + " and state=0)"); } foreach (SYS_PROJECT prj in list) { prj._parentId = prj.PID; } return(list); }
public List <SYS_BUSINESSDATA> BusinessDatas() { List <SYS_BUSINESSDATA> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { list = orm.Query <SYS_BUSINESSDATA>(); } foreach (SYS_BUSINESSDATA data in list) { data._parentId = -1; } return(list); }
public List <SYS_BUSINESSDATADETAIL> BusinessDataDetails(int BusinessDataID, int ParentID) { List <SYS_BUSINESSDATADETAIL> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { string whereClause = "where ParentID=" + ParentID; if (ParentID == 0) { whereClause += " and REF_BUSINESSDATA_ID=" + BusinessDataID; } list = orm.Query <SYS_BUSINESSDATADETAIL>(whereClause); } return(list); }
public ActionResult ArchiveData(ArchiveViewModel model) { List <SYS_ARCHIVE> list = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { string whereClause = " where 1=1 "; if (null != model.PROJECTNO) { whereClause += " and PROJECTNO like '%" + model.PROJECTNO + "%' "; } if (null != model.PROJECTNAME) { whereClause += " and PROJECTNAME like '%" + model.PROJECTNAME + "%' "; } if (null != model.BUILDORG) { whereClause += " and BUILDORG like '%" + model.BUILDORG + "%' "; } if (null != model.BUILDADRESS) { whereClause += " and BUILDADRESS like '%" + model.BUILDADRESS + "%' "; } if (null != model.ARCHIVENO) { whereClause += " and ARCHIVENO like '%" + model.ARCHIVENO + "%' "; } if (null != model.ARCHIVETIMESTART) { whereClause += " and ARCHIVETIME >= to_date('" + model.ARCHIVETIMESTART + "','yyyy-mm-dd') "; } if (null != model.ARCHIVETIMEEND) { whereClause += " and ARCHIVETIME <= to_date('" + model.ARCHIVETIMEEND + "','yyyy-mm-dd') "; } list = orm.Query <SYS_ARCHIVE>(whereClause); } var jss = new System.Web.Script.Serialization.JavaScriptSerializer(); System.Web.HttpContext.Current.Response.Write(jss.Serialize(new { rows = list })); System.Web.HttpContext.Current.Response.End(); return(Json(new { rows = list })); }
public List <SYS_MESSAGE> GetReadMsgs(string UserId) { List <SYS_MESSAGE> result = null; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { result = orm.Query <SYS_MESSAGE>("where STATE=1 and RECVUSERID='" + UserId + "'"); foreach (SYS_MESSAGE msg in result) { ORUP_USER sendUser = orm.Init <ORUP_USER>("where ID=" + msg.SENDUSERID); msg.SENDUSERNAME = sendUser.USERNAME; msg.SENDUSERIMG = sendUser.USERIMG; msg.PROJECTNAME = orm.Init <SYS_PROJECT>("where ID=" + msg.REF_PROJECT_ID).PROJECTNAME; msg.RECVUSERNAME = orm.Init <ORUP_USER>("where ID=" + msg.RECVUSERID).USERNAME; } } return(result); }
public ActionResult Projectsed() { List <SYS_PROJECT> list = null; string UserId = Session["UserId"].ToString(); using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { list = orm.Query <SYS_PROJECT>("where ID in (select ref_project_id from sys_projectworkitem where ref_user_id = " + UserId + " and state=1)"); } foreach (SYS_PROJECT prj in list) { prj._parentId = prj.PID; } var jss = new System.Web.Script.Serialization.JavaScriptSerializer(); System.Web.HttpContext.Current.Response.Write(jss.Serialize(new { rows = list })); System.Web.HttpContext.Current.Response.End(); return(Json(new { rows = list })); }