Exemple #1
0
 ////新增图片
 //public bool InserItemsPic(int ItemID,string BigImg,string SmallImg,string Alt) {
 //    if (sqlHelper.ExcuteCommandInt("insert into Images(ItemID,BigImg,SmallImg,Alt) values ("
 //        +ItemID+",'"+BigImg+"','"+SmallImg+"','"+Alt+"')") > 0)
 //        return true;
 //    else
 //        return false;
 //}
 public bool InserItemsPic(Entity.PicturesItem picture)
 {
     if (sqlHelper.ExcuteCommandInt("insert into Images(ItemID,BigImg,SmallImg,Alt) values ("
                                    + picture.getItemID() + ",'"
                                    + picture.getBigImg() + "','"
                                    + picture.getSmallImg() + "','"
                                    + picture.getAlt() + "')") > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
 //更新指定图片
 //public bool UpdatePicByID(int intImageID,int ItemID, string BigImg, string SmallImg, string Alt)
 //{
 //    if (sqlHelper.ExcuteCommandInt("update Images set ItemID="+ItemID+",BigImg='"+BigImg+"',SmallImg='"+SmallImg+"',Alt='"+Alt+"' where ImageID="+intImageID+")") > 0)
 //        return true;
 //    else
 //        return false;
 //}
 public bool UpdatePicByID(Entity.PicturesItem picture)
 {
     if (sqlHelper.ExcuteCommandInt("update Images set ItemID="
                                    + picture.getItemID() + ",BigImg='"
                                    + picture.getBigImg() + "',SmallImg='"
                                    + picture.getSmallImg() + "',Alt='"
                                    + picture.getAlt() + "' where ImageID="
                                    + picture.getIntImageID() + ")") > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }