public int DelBusinessMaterial(int MaterialID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <SYS_BUSINESSMATERIAL>("where ID=" + MaterialID));
     }
 }
 public SYS_BUSINESSFORM GetBusinessForm(int FormID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <SYS_BUSINESSFORM>("where ID=" + FormID));
     }
 }
Beispiel #3
0
 public int DelUserOrg(int UserOrgId)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <ORUP_ORGANIZATION>("where ID=" + UserOrgId));
     }
 }
 public int DelBusinessRole(int RoleId)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <SYS_BUSINESSROLE>("where ID=" + RoleId));
     }
 }
Beispiel #5
0
 public List <ORUP_USERORGANIZATION> GetUserOrgsByUserID(int UserID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Query <ORUP_USERORGANIZATION>("where UserID=" + UserID));
     }
 }
Beispiel #6
0
 public int DelUser(int UserId)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <ORUP_USER>("where ID=" + UserId));
     }
 }
Beispiel #7
0
 public List <ORUP_ORGANIZATION> Orgs()
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Query <ORUP_ORGANIZATION>());
     }
 }
Beispiel #8
0
 public ORUP_ORGANIZATION GetOrganization(int OrgID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <ORUP_ORGANIZATION>("where ID=" + OrgID));
     }
 }
Beispiel #9
0
 public List <ORUP_USER> Users()
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Query <ORUP_USER>());
     }
 }
Beispiel #10
0
 public int DelRole(int RoleId)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <ORUP_ROLE>("where ID=" + RoleId));
     }
 }
Beispiel #11
0
 public List <ORUP_USERROLE> GetUserRolesByUserID(int UserID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Query <ORUP_USERROLE>("where UserID=" + UserID));
     }
 }
 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 SYS_METADATA MetaData(int MetaDataID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <SYS_METADATA>("where ID=" + MetaDataID));
     }
 }
Beispiel #14
0
 public SYS_SYSTEMCONFIG GetConfig(int ConfigId)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <SYS_SYSTEMCONFIG>("where ID=" + ConfigId));
     }
 }
Beispiel #15
0
 public List <ORUP_ROLE> Roles()
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Query <ORUP_ROLE>());
     }
 }
 public SYS_BUSINESSROLE GetBusinessRole(int RoleID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <SYS_BUSINESSROLE>("where ID=" + RoleID));
     }
 }
Beispiel #17
0
 public List <SYS_SYSTEMCONFIG> Configs()
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Query <SYS_SYSTEMCONFIG>());
     }
 }
 public int DelBusiness(int ID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <SYS_BUSINESS>("where ID=" + ID));
     }
 }
 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 int DelBusinessDataDetail(int ID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(CascadeDelBusinessDataDetail(ID, orm));
     }
 }
 public SYS_BUSINESS Business(int BusinessID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <SYS_BUSINESS>("where ID=" + BusinessID));
     }
 }
 public SYS_BUSINESSDATADETAIL BusinessDataDetail(int BusinessDataID, int MetaDataID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <SYS_BUSINESSDATADETAIL>("where REF_BUSINESSDATA_ID=" + BusinessDataID + " and REF_METADATA_ID=" + MetaDataID));
     }
 }
 public int DelMetaDataDetail(int ID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Delete <SYS_METADATADETAIL>("where ID=" + ID));
     }
 }
Beispiel #24
0
 public ORUP_ROLE GetRole(int RoleID)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         return(orm.Init <ORUP_ROLE>("where ID=" + RoleID));
     }
 }
 public SYS_METADATADETAIL SaveMetaDataDetail(SYS_METADATADETAIL obj)
 {
     using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
     {
         orm.Save(obj);
     }
     return(obj);
 }
        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 SYS_BUSINESSDATA BusinessData(int BusinessDataID)
        {
            SYS_BUSINESSDATA result = null;

            using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler)
            {
                result = orm.Init <SYS_BUSINESSDATA>("where ID=" + BusinessDataID);
            }
            return(result);
        }
Beispiel #29
0
 public void Delete()
 {
     using (ORMHandler orm = DatabaseManager.ORMHandler)
     {
         orm.BeginTransaction();
         Delete(orm);
         orm.Commit();
         orm.Close();
     }
 }
        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);
        }