StringBuildersb=newStringBuilder("select cd.PORTID,cd.PORT,cd.CHAU,cd.PORTTYPE,cd.EDICODE,cd.cname,cd.country,cl.LANE,cd.LANEGID from code_disport as cd left join code_lanes as cl on(cd.lanegid=cl.gid) ");
StringBuildersb=newStringBuilder("select cd.PORTID,cd.PORT,cd.CHAU,cd.PORTTYPE,cd.EDICODE,cd.cname,cd.country,cl.LANE,cd.LANEGID,cd.CannotKoudan from code_disport as cd left join code_lanes as cl on(cd.lanegid=cl.gid) ");
stringsql="select cd.PORTID,cd.PORT,cd.CHAU,cd.PORTTYPE,cd.EDICODE,cd.cname,cd.country,cl.LANE,cd.lanegid,cd.explain,cd.LANEGID from code_disport as cd left join code_lanes as cl on(cd.lanegid=cl.gid) where portid=('" +headData+"')";
stringsql="select cd.PORTID,cd.PORT,cd.CHAU,cd.PORTTYPE,cd.EDICODE,cd.cname,cd.country,cl.LANE,cd.lanegid,cd.explain,cd.LANEGID,cd.CannotKoudan from code_disport as cd left join code_lanes as cl on(cd.lanegid=cl.gid) where portid=('" +headData+"')";
varcmdDelete=db.GetSqlStringCommand("delete from code_disport where portid='"+headData.PORTID+"'");
db.ExecuteNonQuery(cmdDelete,tran);
stringsql=string.Format("insert into code_disport(Portid,port,cname,CHAU,EXPLAIN,PORTTYPE,EDICODE,country,LANEGID) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')",headData.PORTID,headData.PORT.Replace("'","''"),headData.cname,headData.CHAU,headData.DESCRIP,headData.PORTTYPE,headData.EDICODE,headData.country,headData.LANEGID);
stringsql=string.Format("insert into code_disport(Portid,port,cname,CHAU,EXPLAIN,PORTTYPE,EDICODE,country,LANEGID,CannotKoudan) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}')",headData.PORTID,headData.PORT.Replace("'","''"),headData.cname,headData.CHAU,headData.DESCRIP,headData.PORTTYPE,headData.EDICODE,headData.country,headData.LANEGID,headData.CannotKoudan);