Esempio n. 1
0
 //添加电影信息
 public int InsertMovies(Model.Movies movies)
 {
     return(SQLHelp.ExecQuery("insert into [Movies]([MoviesID],[MoviesName],[MoviesNameID],[ReleaseDate],MoviesType],[MoviesLanguage],[MoviesRegion],[MoviesYears],[MoviesDirector],[MoviesActors],[MoviesDesc]) " +
                              "values('" + movies.MoviesID + "','" + movies.MoviesName + "','" + movies.MoviesNameID + "','" + movies.ReleaseDate + "'+'" + movies.MoviesType + "','" + movies.MoviesLanguage + "','" + movies.MoviesRegion + "','" + movies.MoviesDirector + "','" + movies.MoviesActors + "'," + movies.MoviesDesc + "',0,0)"));
 }
Esempio n. 2
0
 //添加材料的数量
 public int InsertMaterial(Model.Material material)
 {
     return(SQLHelp.ExecQuery("insert into [MaterialName],[ImageURL],[Materialunm],[MaterialPrice],[MaterialTypeID],[Origin],[Brand],[Model],[specifications],[Style],[level],[PartsTypeID],[State]) values('"
                              + material.MaterialID + "','" + material.MaterialName + "','" + material.ImageURL + "','" + material.Materialnum + "','" + material.MaterialPrice + "','" + material.MaterialTypeID + "','" + material.Origin + "','" + material.Brand +
                              "','" + material.Model + "','" + material.specifications + "','" + material.Style + "','" + material.level + "','" + material.PartsTypeID + "','" + material.State + "',0,0)"));
 }
Esempio n. 3
0
 //获取电影数量
 public int GetMovies()
 {
     return((int)SQLHelp.ExecScalar("select count(*) from [view_Movies]"));
 }
Esempio n. 4
0
 //添加购物车信息
 public int InsertShoppCar(Model.ShoppCar shoppcar)
 {
     return(SQLHelp.ExecQuery("insert into [UserID],[MaterialID],[MaterialNumCar],[State]) values('" + shoppcar.UserID + "','" + shoppcar.MaterialID + "','" + shoppcar.MaterialNumCar + "','" + shoppcar.State + "',0)"));
 }
Esempio n. 5
0
 //删除材料信息
 public int DeleteMaterial(string id)
 {
     return(SQLHelp.ExecQuery("update [Material] set[State]=1 where [MaterialID] in(" + id + ")"));
 }
Esempio n. 6
0
 //添加用户信息
 public int InserMaterialUser(Model.MaterUser user)
 {
     return(SQLHelp.ExecQuery("insert into [MaterUser]([UserName],[UserAccout],[Password]) values('"
                              + user.UserName + "','" + user.UserAccout + "','" + user.Password + "')"));
 }
Esempio n. 7
0
 /// <summary>
 /// 方法:获取用户的数量
 /// </summary>
 /// <returns>用户的数量</returns>
 public int GetMater()
 {
     return((int)SQLHelp.ExecScalar("select count(*) from [MaterUser]"));
 }
Esempio n. 8
0
 //添加细分类信息
 public int InsertPartsType(Model.PartsType partsType)
 {
     return(SQLHelp.ExecQuery("insert into [PartsTypeName],[MaterialTypeID],[Sate]) values('" + partsType.PartsTypeName + "','" + partsType.MaterialTypeID + "','" + partsType.State + "',0)"));
 }
Esempio n. 9
0
 //添加材料类型信息
 public int InsertMaterialType(Model.MaterialType materType)
 {
     return(SQLHelp.ExecQuery("insert into [TypeName],[Desc],[Sate]) values('" + materType.TypeName + "','" + materType.Desc + "','" + materType.State + "',0)"));
 }
Esempio n. 10
0
 public int InsertComments(Model.Comments Comm)
 {
     return(SQLHelp.ExecQuery("insert into [content],[MaterialID],[UserID],[CommentTime],[praise],[Step],[Sate]) values('" + Comm.content + "','" + Comm.MaterialID + "','" + Comm.UserID + "','" + Comm.CommentTime + "','" + Comm.praise + "','" + Comm.Step + "','" + Comm.State + "',0)"));
 }