using System; using System.Collections.Generic; //using System.Linq; using System.Text; using System.Data.SqlClient; namespace Data.DBHelper { public class category { public int SaveCategory(string parentID,string classID,string classNameEng,string className,string classKey,int isMenu,string url,int classLocation,int classAttrib,int sort,int isUsed,string creator,DateTime createDate,DateTime lastModifyDate) { //StringBuilder searchSql = new StringBuilder(); ////searchSql.Append("select * from [pub].[US_Login] where userID='"+userID+"' and password='"+passwordInput+"'"); //searchSql.Append("select * from [pub].[temp]"); string sql = "insert into CL_WebInfo (parentID,classID,classNameEng,className,classKey,isMenu,url,classLocation,classAttrib,sort,isUsed,creator,createDate,lastModifyDate) values('"+parentID+"','"+classID+"','"+classNameEng+"','"+className+"','"+classKey+"',"+isMenu+",'"+url+"',"+classLocation+","+classAttrib+","+sort+","+isUsed+",'"+creator+"','"+createDate+"','"+lastModifyDate+"')"; SqlCommand cmd = new SqlCommand(); cmd.CommandText = sql.ToString(); SqlParameter[] p = new SqlParameter[1]; //p[0] = SqlHelper.GetParameter("@loginName", loginName); //p[1] = SqlHelper.GetParameter("@passwordInput", passwordInput); return SqlHelper.ExecuteTransSql(sql, p); } } }