protected void LoadDetailData() { check ck = new check(); string order_code = ""; order_code = ck.CheckInput(GetRequestQueryString("orderid", "0")); pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; sql += "SELECT * FROM TB_ORDER_DETAIL WHERE order_code = '" + order_code + "' ORDER BY detail_date ASC"; ds = cn.mdb_ds(sql, "detail"); ltrHeadTitle.Text = order_code; RptOrderDetail.DataSource = ds.Tables["detail"].DefaultView; RptOrderDetail.DataBind(); }
protected void LoadListData() { check ck = new check(); string f1 = "0"; string f2 = "0"; string u = ""; f1 = ck.CheckNumber(GetRequestQueryString("f1", "0")); f2 = ck.CheckNumber(GetRequestQueryString("f2", "0")); u = ck.CheckNumber(GetRequestCookies("user_id", "0")); string where_user = "******"; string connect_user = "******"; string op_user = "******"; string status_user = "******"; string sql_order_status = ""; if (f2 == "1") { sql_order_status = "AND TB_ORDER.order_status = 2 "; } if (f2 == "2") { sql_order_status = "AND TB_ORDER.order_status in (3,4) "; } if (f2 == "3") { sql_order_status = "AND TB_ORDER.order_status = 5 "; } if (f2 == "4") { sql_order_status = "AND TB_ORDER.order_status in (10,11,12,13,14) "; } if (f2 == "5") { sql_order_status = "AND TB_ORDER.order_status in (6,7,8,9) "; } if (f2 == "6") { sql_order_status = "AND TB_ORDER.order_status = 1 "; } //判断是收到订单页还是发出订单页 if (f1 == "0") { where_user = "******"; connect_user = "******"; op_user = "******"; status_user = "******"; } if (f1 == "1") { where_user = "******"; connect_user = "******"; op_user = "******"; status_user = "******"; sql_order_status += " AND TB_ORDER.order_status <> 1 "; } pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; sql += "SELECT "; sql += "TB_ORDER.date_create, "; sql += "TB_ORDER.order_code, "; sql += "TB_USER.CompanyName, "; sql += "TB_USER.userid, "; sql += "TB_ORDER_STATUS.status_font_weight, "; sql += "TB_ORDER_STATUS." + status_user + " as status_name, "; sql += "TB_ORDER_STATUS." + op_user + " AS op "; sql += "FROM TB_ORDER,TB_USER,TB_ORDER_STATUS "; sql += "WHERE 1=1 "; sql += "AND TB_ORDER." + connect_user + " = TB_USER.userid "; sql += "AND TB_ORDER.order_status = TB_ORDER_STATUS.sid "; sql += "AND TB_ORDER." + where_user + " = " + u; sql += sql_order_status; sql += "ORDER BY status_level ASC,date_create DESC "; //Response.Write(sql); ds = cn.mdb_ds(sql, "order"); RptOrder.DataSource = ds.Tables["order"].DefaultView; RptOrder.DataBind(); }
protected void SetOrderDetail(string a,string c1,string c2) { //a是行为的角色,1为货主,2为货代,0为系统 //c1是操作之前的状态号 //c2是操作之后的状态号码 //数组中参数{1}将被具体角色替换,{1}将被货主公司名替换,{2}将被货代公司名替换 check ck = new check(); string order_code = ck.CheckInput(txtCode.Text); string[] op_array = new string[29]; op_array[0] = "1|0|1|订舱方 {1} 保存订单"; op_array[1] = "1|0|2|订舱方 {1} 提交订舱单,等待承运方答复"; op_array[2] = "1|1|2|订舱方 {1} 提交订舱单,等待承运方答复"; op_array[3] = "2|2|3|承运方 {2} 接受订舱"; op_array[4] = "2|2|6|承运方 {2} 不接受订舱,申请系统审核"; op_array[5] = "2|6|2|承运方 {2} 取消不接受订舱"; op_array[6] = "0|6|11|系统通过了承运方 {2} 的不接受订舱申请,该订单作废"; op_array[7] = "0|6|2|系统未通过承运方 {2} 的不接受订舱申请,该订单恢复原状态"; op_array[8] = "1|12|2|订舱方 {1} 恢复了该订舱单,重新等待承运方答复"; op_array[9] = "1|2|7|订舱方 {1} 撤消了该订舱单"; op_array[10] = "1|7|2|订舱方 {1} 取消撤消该订舱单,重新等待承运方答复"; op_array[11] = "0|7|12|系统通过了订舱方 {1} 的撤消订舱申请,该订单作废"; op_array[12] = "0|7|2|系统未通过订舱方 {1} 的撤消订舱申请,该订单恢复原状态"; op_array[13] = "1|12|2|订舱方 {1} 恢复了该订舱单,重新等待承运方答复"; op_array[14] = "1|3|4|订舱方 {1} 确认出运"; op_array[15] = "1|3|8|订舱方 {1} 撤消了该订舱单"; op_array[16] = "1|8|3|订舱方 {1} 取消撤消该订舱单,重新等待承运方答复"; op_array[17] = "0|8|13|系统通过了订舱方 {1} 的撤消订舱申请,该订单作废"; op_array[18] = "0|8|3|系统未通过订舱方 {1} 的撤消订舱申请,该订单恢复原状态"; op_array[19] = "1|13|8|订舱方 {1} 恢复了该订舱单,重新等待承运方答复"; op_array[20] = "2|3|5|承运方 {2} 确认出运,交易结束"; op_array[21] = "2|4|5|承运方 {2} 同意完成,交易结束"; op_array[22] = "1|4|9|订舱方 {1} 撤消了该订舱单"; op_array[23] = "1|9|4|订舱方 {1} 取消撤消该订舱单,重新等待承运方答复"; op_array[24] = "0|9|14|系统通过了订舱方 {1} 的撤消订舱申请,该订单作废"; op_array[25] = "0|9|4|系统未通过订舱方 {1} 的撤消订舱申请,该订单恢复原状态"; op_array[26] = "1|14|9|订舱方 {1} 恢复了该订舱单,重新等待承运方答复"; op_array[27] = "1|1|10|订舱方 {1} 删除该订舱单"; op_array[28] = "1|10|1|订舱方 {1} 恢复该订舱单"; string detail_txt = ""; for (int i = 0; i < op_array.Length; i++) { if (a == op_array[i].Split('|')[0].ToString() & c1 == op_array[i].Split('|')[1].ToString() & c2 == op_array[i].Split('|')[2].ToString()) { detail_txt = op_array[i].Split('|')[3].ToString(); } }//确认当前的状态数组 string sql = ""; sql += "SELECT "; sql += "TB_ORDER.date_create, "; sql += "TB_ORDER.order_code, "; sql += "UA.userid AS aid, "; sql += "UB.userid AS bid, "; sql += "UA.CompanyName AS aname, "; sql += "UB.CompanyName AS bname "; sql += "FROM TB_ORDER,TB_USER UA,TB_USER UB "; sql += "WHERE 1=1 "; sql += "AND TB_ORDER.order_shipper = UA.userid "; sql += "AND TB_ORDER.order_forward = UB.userid "; sql += "AND TB_ORDER.order_code = '" + order_code + "'"; pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); ds = cn.mdb_ds(sql, "order"); detail_txt = detail_txt.Replace("{1}", "<a href= \"/company/" + setkey(ds.Tables["order"].Rows[0]["aid"].ToString()) + "/\" target=\"_blank\">" + ds.Tables["order"].Rows[0]["aname"].ToString() + "</a>"); detail_txt = detail_txt.Replace("{2}", "<a href= \"/company/" + setkey(ds.Tables["order"].Rows[0]["bid"].ToString()) + "/\" target=\"_blank\">" + ds.Tables["order"].Rows[0]["bname"].ToString() + "</a>"); sql = "INSERT INTO TB_ORDER_DETAIL (order_code,detail_txt,detail_date) VALUES ('" + order_code + "','" + detail_txt + "',GetDate())"; cn.mdb_exe(sql); if (c2 == "5") { sql = "SELECT * FROM TB_ORDER WHERE order_code = '" + order_code + "'"; DataSet ds1 = new DataSet(); ds1 = cn.mdb_ds(sql, "account"); double base_fee = 0; base_fee = Convert.ToDouble(ds1.Tables["account"].Rows[0]["container_20gp"].ToString()) * 150; base_fee += Convert.ToDouble(ds1.Tables["account"].Rows[0]["container_40gp"].ToString()) * 150; base_fee += Convert.ToDouble(ds1.Tables["account"].Rows[0]["container_40hq"].ToString()) * 150; sql = "UPDATE TB_ORDER_ACCOUNT SET credit = credit + " + base_fee + " WHERE userid = " + ds.Tables["order"].Rows[0]["aid"].ToString(); cn.mdb_exe(sql); sql = "UPDATE TB_ORDER_ACCOUNT SET credit = credit - " + base_fee * 2 + " WHERE userid = " + ds.Tables["order"].Rows[0]["bid"].ToString(); cn.mdb_exe(sql); } }
protected void LoadFreightData() { check ck = new check(); pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; //获取运价信息 string yid = ""; yid = ck.CheckNumber(GetRequestQueryString("yid", "0")); sql = "SELECT * FROM tb_yunjia WHERE id = " + yid; ds = cn.mdb_ds(sql, "yunjia"); ltrYid.Text = "<a href=\"/fcl/" + setkey(yid) + "_0.html\" target=\"_blank\">" + yid + "</a>"; ltrYid2.Text = yid; ltrStartPort.Text = ds.Tables["yunjia"].Rows[0]["Startport"].ToString(); ltrDestPort.Text = ds.Tables["yunjia"].Rows[0]["Destport1"].ToString(); ltrCarrier.Text = ds.Tables["yunjia"].Rows[0]["shipcompany1"].ToString(); ltrEndDate.Text = Convert.ToDateTime(ds.Tables["yunjia"].Rows[0]["enddate"].ToString()).ToString("yyyy-MM-dd"); ltrUserid.Text = ds.Tables["yunjia"].Rows[0]["userid"].ToString(); //获取本人信息 string userid = ""; userid = ck.CheckNumber(GetRequestCookies("user_id","0")); sql = "SELECT * FROM tb_user WHERE userid = " + userid; ds = cn.mdb_ds(sql, "user"); ltrUserEmail.Text = ds.Tables["user"].Rows[0]["UserEmail"].ToString(); ltrRealName.Text = ds.Tables["user"].Rows[0]["RealName"].ToString(); ltrMovePhone.Text = ds.Tables["user"].Rows[0]["MovePhone"].ToString(); ltrPhone.Text = ds.Tables["user"].Rows[0]["Phone"].ToString(); ltrFax.Text = ds.Tables["user"].Rows[0]["Fax"].ToString(); }
protected void LoadOrderData() { check ck = new check(); pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; //获取运价信息 string orderid = ""; orderid = ck.CheckInput(GetRequestQueryString("orderid", "0")); sql = "SELECT * FROM tb_order WHERE order_code = '" + orderid + "'"; ds = cn.mdb_ds(sql, "order"); ltrYid.Text = "<a href=\"/fcl/" + setkey(ds.Tables["order"].Rows[0]["freight_code"].ToString()) + "_0.html\" target=\"_blank\">" + ds.Tables["order"].Rows[0]["freight_code"].ToString() + "</a>"; ltrYid2.Text = ds.Tables["order"].Rows[0]["freight_code"].ToString(); ltrStartPort.Text = ds.Tables["order"].Rows[0]["startport"].ToString(); ltrDestPort.Text = ds.Tables["order"].Rows[0]["destport"].ToString(); ltrCarrier.Text = ds.Tables["order"].Rows[0]["carrier_name"].ToString(); //ltrEndDate.Text = Convert.ToDateTime(ds.Tables["order"].Rows[0]["enddate"].ToString()).ToString("yyyy-MM-dd"); ltrUserid.Text = ds.Tables["order"].Rows[0]["order_forward"].ToString(); txtShipperName.Value = ds.Tables["order"].Rows[0]["shipper_name"].ToString(); txtCargoName.Value = ds.Tables["order"].Rows[0]["cargo_name"].ToString(); txtMeasurement.Value = ds.Tables["order"].Rows[0]["measurement"].ToString(); ltrGongZuoBianHao.Text = ds.Tables["order"].Rows[0]["order_code"].ToString(); txtContainer_20gp.Value = ds.Tables["order"].Rows[0]["container_20gp"].ToString(); txtContainer_40gp.Value = ds.Tables["order"].Rows[0]["container_40gp"].ToString(); txtContainer_40hq.Value = ds.Tables["order"].Rows[0]["container_40hq"].ToString(); //获取本人信息 string userid = ""; userid = ck.CheckNumber(GetRequestCookies("user_id", "0")); sql = "SELECT * FROM tb_user WHERE userid = " + userid; ds = cn.mdb_ds(sql, "user"); ltrUserEmail.Text = ds.Tables["user"].Rows[0]["UserEmail"].ToString(); ltrRealName.Text = ds.Tables["user"].Rows[0]["RealName"].ToString(); ltrMovePhone.Text = ds.Tables["user"].Rows[0]["MovePhone"].ToString(); ltrPhone.Text = ds.Tables["user"].Rows[0]["Phone"].ToString(); ltrFax.Text = ds.Tables["user"].Rows[0]["Fax"].ToString(); }
protected void LoadListData() { check ck = new check(); string f2 = "0"; f2 = ck.CheckNumber(GetRequestQueryString("f2", "0")); string sql_order_status = ""; if (f2 == "1") { sql_order_status = "AND TB_ORDER.order_status in (6,7,8,9) "; } pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; sql += "SELECT "; sql += "TB_ORDER.date_create, "; sql += "TB_ORDER.order_code, "; sql += "UA.userid AS aid, "; sql += "UB.userid AS bid, "; sql += "UA.CompanyName AS aname, "; sql += "UB.CompanyName AS bname, "; sql += "TB_ORDER_STATUS.status_name_admin AS status_name, "; sql += "TB_ORDER_STATUS.status_op_admin AS op "; sql += "FROM TB_ORDER,TB_USER UA,TB_USER UB,TB_ORDER_STATUS "; sql += "WHERE 1=1 "; sql += "AND TB_ORDER.order_shipper = UA.userid "; sql += "AND TB_ORDER.order_forward = UB.userid "; sql += "AND TB_ORDER.order_status = TB_ORDER_STATUS.sid "; sql += sql_order_status; sql += "ORDER BY date_create DESC "; //Response.Write(sql); ds = cn.mdb_ds(sql, "order"); RptOrder.DataSource = ds.Tables["order"].DefaultView; RptOrder.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { ltrHeadTitle.Text = "运价 / 整箱订舱"; pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; sql += "select top 15 "; sql += "tb_yunjia.shipcompany1 as shipcompany, "; sql += "tb_yunjia.id as sid,'0' as id, "; sql += "tb_yunjia.startport as startport, "; sql += "tb_yunjia.title, "; sql += "tb_yunjia.postdate as postdate, "; sql += "tb_yunjia.enddate as enddate, "; sql += "tb_yunjia.hangxianmiaoshu, "; sql += "tb_yunjia.DestPort1 as destport, "; sql += "tb_yunjia.price20gp1 as price20gp, "; sql += "tb_yunjia.price40gp1 as price40gp, "; sql += "tb_yunjia.price40hq1 as price40hq, "; sql += "tb_user.userid, "; sql += "tb_user.companyname "; sql += "from tb_yunjia,tb_user "; sql += "where 1=1 "; sql += "and tb_user.userid = tb_yunjia.userid "; sql += "and tb_yunjia.yunjialeixing = 8 "; sql += "ORDER BY postdate DESC "; ds = cn.mdb_ds(sql, "freight"); Rptfcl.DataSource = ds.Tables["freight"].DefaultView; Rptfcl.DataBind(); }
protected void LoadListData() { check ck = new check(); string f2 = "0"; f2 = ck.CheckNumber(GetRequestQueryString("f2", "0")); string sql_order_status = ""; if (f2 == "1") { sql_order_status = "AND TB_ORDER_ACCOUNT.account_status = 1 "; } if (f2 == "2") { sql_order_status = "AND TB_ORDER_ACCOUNT.account_status = 0 "; } if (f2 == "3") { sql_order_status = "AND TB_ORDER_ACCOUNT.account_status = 2 "; } string q = ck.CheckInput(GetRequestQueryString("q", "")); string sql_q = ""; if (q != "") { sql_q = "AND (TB_User.companyname like '%" + q + "%' "; sql_q += "OR TB_User.realname like '%" + q + "%' "; sql_q += "OR TB_User.username like '%" + q + "%' "; sql_q += ")"; txtSearch.Text = q; search_words = q; } pro_data_conn cn = new pro_data_conn(); DataSet ds = new DataSet(); string sql = ""; sql += "SELECT TOP 10 "; sql += "TB_User.userid, "; sql += "TB_User.username, "; sql += "TB_User.realname, "; sql += "TB_User.companyname, "; sql += "TB_ORDER_ACCOUNT.credit, "; sql += "TB_ORDER_ACCOUNT.account_status, "; sql += "TB_ORDER_ACCOUNT_STATUS.status_name, "; sql += "TB_ORDER_ACCOUNT_STATUS.status_op "; sql += "FROM TB_User,TB_ORDER_ACCOUNT,TB_ORDER_ACCOUNT_STATUS "; sql += "WHERE 1=1 "; sql += "AND TB_User.userid = TB_ORDER_ACCOUNT.userid "; sql += "AND TB_ORDER_ACCOUNT.account_status = TB_ORDER_ACCOUNT_STATUS.sid "; sql += sql_order_status; sql += sql_q; sql += "ORDER BY TB_User.userid DESC "; //Response.Write(sql); ds = cn.mdb_ds(sql, "account"); RptAccount.DataSource = ds.Tables["account"].DefaultView; RptAccount.DataBind(); }