Esempio n. 1
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT * FROM ( ");
            strSql.Append(" SELECT ROW_NUMBER() OVER (");
            if (!string.IsNullOrEmpty(orderby.Trim()))
            {
                strSql.Append("order by T." + orderby);
            }
            else
            {
                strSql.Append("order by T.ID desc");
            }
            strSql.Append(")AS Row, T.*  from News T ");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                strSql.Append(" WHERE " + strWhere);
            }
            strSql.Append(" ) TT");
            strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
            return(DbHelperSql.Query(strSql.ToString()));
        }
        /// <summary>
        /// 获得项目 状态的统计
        /// </summary>
        public void GetPrjanalyze()
        {
            string sql = "select DISTINCT Projectstatus from Project";

            if (!string.IsNullOrEmpty(time.Text))
            {
                sql = "select DISTINCT Projectstatus from Project where addTime LIKE '%" + time.Text.Trim() + "%'";
            }
            var ds = DbHelperSql.Query(sql);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                //获取每一个项目
                string sa = ds.Tables[0].Rows[i]["Projectstatus"].ToString();
                var    dd = _projectBll.GetList("Projectstatus='" + sa + "'");

                if (dd.Tables[0].Rows.Count > 0)
                {
                    int count = dd.Tables[0].Rows.Count;
                    Prjanalyze += "{ value: " + count + ", name: '" + sa + "' },";
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ClassLibrary1.Model.Department GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,DepartmentUuid,DepartmentName,ResPeople,Phone,IsDeleted,AddTime,AddPeople from Department ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            ClassLibrary1.Model.Department model = new ClassLibrary1.Model.Department();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.TourGuide GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,TourGuideUUID,TourGuideName,Phone,ReleaseTime,ReleaseState,IsDeleted,AddTime,AddPeople,Picture,Content,FMPicture from TourGuide ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.TourGuide model = new HeqiaoDaoshiCore.Model.TourGuide();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Hotel GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,HotelUUID,Name,Phone,Introduction,Address,Price,Picture,State,IsDelete,AddTime,AddPeople,Cover,HotelUrl,Lon,Lat,ShopId from Hotel ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Hotel model = new HeqiaoDaoshiCore.Model.Hotel();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Bank GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 BankUuid,ID,IsDeleted,BankName,BankAddress,Lon,Lat,Staues,Telephone,Remark,RemarkOne,RemarkTwo,Picture,AddTime,AddPeople from Bank ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Bank model = new HeqiaoDaoshiCore.Model.Bank();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Gtoilet GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 GtoiletUuid,ID,IsDeleted,GtoiletName,GtoiletAddress,Lon,Lat,GtoiletStaues,KongqiZhil,WaterYujin,AddTime,AddPeople,Picture from Gtoilet ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Gtoilet model = new HeqiaoDaoshiCore.Model.Gtoilet();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Haikan.SchoolProjectsCore.MDB.Model.HFile GetModel(int FileID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 FileID,EnterpriseName,EnterpriseFile,ContractFile,InvoiceFile,ProjectFile,IsDele from HFile ");
            strSql.Append(" where FileID=@FileID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@FileID", SqlDbType.Int, 4)
            };
            parameters[0].Value = FileID;

            Haikan.SchoolProjectsCore.MDB.Model.HFile model = new Haikan.SchoolProjectsCore.MDB.Model.HFile();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Mapmark GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,MapmarkUUID,MarkUUID,Position,IsDelete,Introduce from Mapmark ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Mapmark model = new HeqiaoDaoshiCore.Model.Mapmark();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 10
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.ActiveQuantity GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,ActiveQuantityUUID,AddTime,Num,Type from ActiveQuantity ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.ActiveQuantity model = new HeqiaoDaoshiCore.Model.ActiveQuantity();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Bus GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,BusUuid,Name,PassSite,Introduction,Address,Picture,State,IsDelete,BegainTime,EndTime,BegainSite,EndSite,type from Bus ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Bus model = new HeqiaoDaoshiCore.Model.Bus();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 12
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Haikan.SchoolProjectsCore.MDB.Model.Department GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,DepartmentName,ChargeMan,Tel,Fax,details,IsDelete from Department ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            Haikan.SchoolProjectsCore.MDB.Model.Department model = new Haikan.SchoolProjectsCore.MDB.Model.Department();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 13
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Haikan.LabSystemCore.Model.CreditCardBehavior GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CardNo,DeviceID,AddTime,ProjectID from CreditCardBehavior ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            Haikan.LabSystemCore.Model.CreditCardBehavior model = new Haikan.LabSystemCore.Model.CreditCardBehavior();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 14
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Haikan.SchoolProjectsCore.MDB.Model.Eenterprises GetModel(int EnterpriseID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 EnterpriseID,EnterpriseName,Contact,EInformation,Note,Audit from Eenterprises ");
            strSql.Append(" where EnterpriseID=@EnterpriseID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@EnterpriseID", SqlDbType.Int, 4)
            };
            parameters[0].Value = EnterpriseID;

            Haikan.SchoolProjectsCore.MDB.Model.Eenterprises model = new Haikan.SchoolProjectsCore.MDB.Model.Eenterprises();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Haikan.LabSystemCore.Model.Student GetModel(int id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 id,stuid,classid,stuname,sex,phone,belong,inschool,birthday,username,userpassword,type,isaudite,roleid,photo,lasttime,linestate,Email,teachers,studentcard,core,classes,SecondTeacher,StudentType,date,tezhengma from Student ");
            strSql.Append(" where id=@id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@id", SqlDbType.Int, 4)
            };
            parameters[0].Value = id;

            Haikan.LabSystemCore.Model.Student model = new Haikan.LabSystemCore.Model.Student();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Tourism GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 TourismUuid,ID,CreateTime,Name,SpotContent,Address,Picture,Video,Audio,IsDelete,OrderBy,State,AddTime,AddPeople from Tourism ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Tourism model = new HeqiaoDaoshiCore.Model.Tourism();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public big_data.Model.UnifiedAddressLibraryUserInfo GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,UnifiedAddressLibraryID,UserIDList,AddTime from UnifiedAddressLibraryUserInfo ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            big_data.Model.UnifiedAddressLibraryUserInfo model = new big_data.Model.UnifiedAddressLibraryUserInfo();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 18
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.News GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,NewsUUID,Title,NewsContent,IsDelete,ReleaseState from News ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.News model = new HeqiaoDaoshiCore.Model.News();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 19
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Food GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,FoodUUID,FoodName,Title,Introduction,Address,Price,Picture,State,IsDelete,FoodorTechan,Cover,Lon,Lat,ytype,PlayType,ShopId from Food ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Food model = new HeqiaoDaoshiCore.Model.Food();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 20
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.CulturalIntroduc GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 CulturalIntroducUUID,Title,ReleaseTime,IsRelease,Cover,Content,AddTime,AddPeople,ID,IsDeleted,Photo from CulturalIntroduc ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.CulturalIntroduc model = new HeqiaoDaoshiCore.Model.CulturalIntroduc();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 21
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public big_data.Model.UnifiedAddressLibrary GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 UnifiedAddressLibraryUUID,ID,oid,SOURCEADDRESS,CITY,COUNTY,TOWN,COMMUNITY,SQUAD,VILLAGE,SZONE,STREET,DOOR,RESREGION,BUILDING,BUILDING_NUM,UNIT,FLOOR,ROOM,GRID_CODE,BUILDING_CODE,HOUSE_CODE,CODE,CREATETIME,UPDATETIME,ISVALID,FROM_STATUS,TO_STATUS,BUILDING_PATH,DATASOURCE,REVERSE1,REVERSE2,LON,LAT,Z,ROOM_FLOOR,ADDRTYPE,GUID,INSERTTIME,SYSTEMID,ISDELETE,BELONG_BUILDING,ADDRESS_TYPE,REMARK,AddTime from UnifiedAddressLibrary ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            big_data.Model.UnifiedAddressLibrary model = new big_data.Model.UnifiedAddressLibrary();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 22
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.HotelRoom GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,HotelRoomUuid,HotelRoomName,Price,Introduction,Address,Picture,State,IsDelete,HotelUuid from HotelRoom ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.HotelRoom model = new HeqiaoDaoshiCore.Model.HotelRoom();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 23
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ClassLibrary1.Model.YiCardLSXX GetModel(int Id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Id,YicardUuid,YicardName,Possessor,ConsumType,ExpenseCal,Balance,IsDeleted,AddTime,AddPeople,ConsumTime,Address,SiteName,DepName from YiCardLSXX ");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Id;

            ClassLibrary1.Model.YiCardLSXX model = new ClassLibrary1.Model.YiCardLSXX();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 24
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.CarPark GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,CarParkUUID,Name,Specification,Address,Price,Picture,State,IsDelete,TruckSpace,SurplusTS,Lon,Lat,OneP,TwoP,ThreeP,FourP,OutFP,ChargesNotes,AddTime,AddPeople from CarPark ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.CarPark model = new HeqiaoDaoshiCore.Model.CarPark();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 25
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ClassLibrary1.Model.SystemUser GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 SystemUserUUID,LoginName,RealName,UserIdCard,PassWord,UserType,SchoolUUID,AddTime,AddPeople,IsDeleted,ManageDepartment,ID,ZaiGang,Phone,Email,Sex,InTime,Types,Address,SystemRoleUUid,Remarks,StaffNum,Wechat,Topic,Content,Train,Main,Job,HealthCertificate,IsStaff,IsCreEdu,PersonnelType,ReviewStatus,CardNumber,IsBlacklist from SystemUser ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            ClassLibrary1.Model.SystemUser model = new ClassLibrary1.Model.SystemUser();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 26
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.Information GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,InformationUUID,Title,InformationTypeUUID,Introduce,Address,StartTime,Picture,State,IsDeleted,Photo from Information ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.Information model = new HeqiaoDaoshiCore.Model.Information();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 27
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HeqiaoDaoshiCore.Model.SystemIcon GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 SystemIconUUID,Code,Size,Color,Custom,Description,Status,IsDeleted,CreatedOn,CreatedByUserGuid,CreatedByUserName,ModifiedOn,ModifiedByUserGuid,ModifiedByUserName,ID from SystemIcon ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            HeqiaoDaoshiCore.Model.SystemIcon model = new HeqiaoDaoshiCore.Model.SystemIcon();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 28
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ClassLibrary1.Model.TcqType GetModel(Guid Tcqguid)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Tcqguid,Tcqid,TcqName from TcqType ");
            strSql.Append(" where Tcqguid=@Tcqguid ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Tcqguid", SqlDbType.UniqueIdentifier, 16)
            };
            parameters[0].Value = Tcqguid;

            ClassLibrary1.Model.TcqType model = new ClassLibrary1.Model.TcqType();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 29
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ClassLibrary1.Model.Teacher GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 ID,CreateTime,TeacherUuid,Name,Sex,Gh,DepartmentUuid,YiCard,DormitoryUuid,Picture,DormitoryNumUuid,Phone,IdCard,Email,Nation,Political,Religion,IsDeleted,AddTime,AddPeople,SchoolDistrictUuid,ProfessionalTitle from Teacher ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            ClassLibrary1.Model.Teacher model = new ClassLibrary1.Model.Teacher();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 30
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public big_data.Model.Userinfoty GetModel(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 UserInfoUUID,ID,IsDeleted,AddTime,AddPeople,RealName,UserIdCard,Wechat,Phone,Email,Sex,Address,DepartmentUUID,Birth,IdentityCard,Residence,Domicile,Nation,Education,QianYiSTime,QianYiETime,Settled,Occupation,DyStaues,Politics,position,Evaluate,OrganizationUuid,JoinArmy,ArmyTime,SettledTime,TownUuid,Defense,Category,Partybranch,JoinDate,Work,Age,Household,Relation,HouseholderName from Userinfoty ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            big_data.Model.Userinfoty model = new big_data.Model.Userinfoty();
            DataSet ds = DbHelperSql.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }