毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

电子商务毕业论文 第11页

更新时间:2009-3-9:  来源:毕业论文

CD在线商店销售系统设计|电子商务网站毕业设计|电子商务毕业论文 第11页|免费论文
ind.setSubmitTime(rs.getString("submitTime"));
          ind.setConsignmentTime(rs.getString("ConsignmentTime"));
          ind.setTotalPrice(rs.getFloat("TotalPrice"));
          ind.setContent(rs.getString("content"));
          ind.setIPAddress(rs.getString("IpAddress"));
          if (rs.getInt("IsPayoff") == 1)
            ind.setIsPayoff(false);
          else
            ind.setIsPayoff(true);
          if (rs.getInt("IsSales") == 1)
            ind.setIsSales(false);
          else
            ind.setIsSales(true);
          allorder.addElement(ind);
        }
        close();
        return true;
      }
      catch (SQLException e) {
        System.out.println(e);
        return false;
      }
    }
    /**
     * 获得订单列表
     * @param nid
     * @return
     */
    public boolean getAllorder(String order_id) {
      sqlStr = "select * from allorder where orderId = '" + order_id + "'";
      try {
        DataBase db = new DataBase();
                  db.connect();
                  stmt = db.conn.createStatement ();

        rs = stmt.executeQuery(sqlStr);
        order_list = new Vector();
        while (rs.next()) {
          allorder identlist = new allorder();
          identlist.setId(rs.getLong("id"));
          identlist.setOrderId(rs.getLong("orderId"));
          identlist.setcdNo(rs.getLong("cdNo"));
          identlist.setAmount(rs.getInt("Amount"));
          order_list.addElement(identlist);
        }
        close();
        return true;
      }
      catch (SQLException e) {
        System.out.print(e.getMessage());
        return false;
      }
    }
    /**
     * 修改订单,修改付款标志
     * @param res
     * @return
     */
    public boolean update(HttpServletRequest res) {
      request = res;
      int payoff = 1;
      int sales = 1;
      //long orderId = 0;
      try {
        System.out.println("payoff:"+request.getParameter("payoff"));
        payoff = Integer.parseInt(request.getParameter("payoff"));
        sales = Integer.parseInt(request.getParameter("sales"));
        orderId =request.getParameter("indentid");
        sqlStr = "update orders set IsPayoff = '" + payoff + "',IsSales='" +
            sales + "' where orderId =" + orderId;
        DataBase db = new DataBase();
                  db.connect();
                  stmt = db.conn.createStatement ();
                  System.out.print(sqlStr);
        stmt.execute(sqlStr);
        return true;
      }
      catch (Exception e) {
        System.out.print(e.getMessage());
        return false;
      }
    }
    /**
     * 删除订单
     * @param id
     * @return
     */
    public boolean delete(long id) {
      try {
        DataBase db = new DataBase();
                  db.connect();
                  stmt = db.conn.createStatement ();
        sqlStr = "delete from allorder where id =" + id;
        stmt.execute(sqlStr);
        sqlStr = "delete from orders where id= " + id;
        stmt.execute(sqlStr);
        return true;
      }
      catch (SQLException e) {
        return false;
      }
    }

  }
op_cd.java类:
package cdshop.run;
/**
 * <p>管理CD的类,包括CD的修改、查询,删除,添加 </p>
 */
import java.sql.*;
import java.util.Vector;
import cdshop.util.*;
import cdshop.cd.*;
import javax.servlet.http.HttpServletRequest;

public class op_cd extends DataBase{
  private cd acds = new cd();                        //新的CD类
        private javax.servlet.http.HttpServletRequest request; //建立页面请求
        private boolean sqlflag = true ;      //对接收到的数据是否正确
        private Vector cdlist;       //显示CD列表向量数组
        private int page = 1;           //显示的页码
        private int pageSize=10;    //每页显示的CD数
        private int pageCount =0;    //页面总数
        private long recordCount =0;           //查询的记录总数
        public String sqlStr="";
        public Vector getcdlist() {
                return cdlist;
        }
        public boolean getSqlflag() {
                return sqlflag;
        }
        public String to_String( String str) {
                try
                {
                        return new String(str.getBytes("ISO8859-1"));
                }
                catch (Exception e)
                {
                        return str;
                }
        }
        /**
         * 将页面表单传来的资料分解
         */
public boolean getRequest(javax.servlet.http.HttpServletRequest newrequest) {
  boolean flag = false;
  try{
   request = newrequest;
   String ID = request.getParameter("id");
   long cdid = 0;
   try{
           cdid = Long.parseLong(ID);
   }catch (Exception e){
   }
   acds.setId(cdid);
   String cdname = request.getParameter("cdname");
   if (cdname==null || cdname.equals(""))
   {
           cdname = "";
           sqlflag = false;
   }
   acds.setcdName(to_String(cdname));
   String Singer = request.getParameter("Singer");
   if (Singer==null || Singer.equals(""))
   {
           Singer = "";
           sqlflag = false;
   }
   acds.setSinger(to_String(Singer));
   String publish = request.getParameter("publish");;
   if (publish==null)
   {
           publish = "";

 << 上一页  [11] [12] [13] [14] [15] [16] [17] [18] [19] 下一页

电子商务毕业论文 第11页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。