protected void LoadRecord() { data_conn cn = new data_conn(); DataSet ds = new DataSet(); check ck = new check(); string date1 = ""; string date2 = ""; string date3 = ""; string date4 = ""; string sqldate1 = ""; string sqldate2 = ""; string sqldate3 = ""; string sqldate4 = ""; string ftype = "8"; date1 = BasicDatePicker1_TextBox.Value.ToString(); date2 = BasicDatePicker2_TextBox.Value.ToString(); date3 = BasicDatePicker1_TextBox.Value.ToString(); date4 = BasicDatePicker2_TextBox.Value.ToString(); if (date1 != "") { date3 = date3 + " 00:00:00"; sqldate3 = sqldate3 + "AND nowtime >= '" + date3 + "' "; sqldate1 = sqldate1 + "AND dateparts >= '" + date1 + "' "; } if (date2 != "") { date4 = date4 + " 23:59:59"; sqldate4 = sqldate4 + "AND nowtime <= '" + date4 + "' "; sqldate2 = sqldate2 + "AND dateparts <= '" + date2 + "' "; } string sql = ""; if (f1 == "0") { if (type == "8" | type == "0") { Literal1.Text = "整箱运价" + " <a href=\"hitindex.aspx?u=" + u + "&type=9<ime1=" + BasicDatePicker1_TextBox.Value + "<ime2=" + BasicDatePicker2_TextBox.Value + "\">拼箱运价</a>" + " <a href=\"hitindex.aspx?u=" + u + "&type=10<ime1=" + BasicDatePicker1_TextBox.Value + "<ime2=" + BasicDatePicker2_TextBox.Value + "\">空运运价</a>"; } if (type == "9") { Literal1.Text = "<a href=\"hitindex.aspx?u=" + u + "&type=8<ime1=" + BasicDatePicker1_TextBox.Value + "<ime2=" + BasicDatePicker2_TextBox.Value + "\">整箱运价</a>" + " 拼箱运价" + " <a href=\"hitindex.aspx?u=" + u + "&type=10<ime1=" + BasicDatePicker1_TextBox.Value + "<ime2=" + BasicDatePicker2_TextBox.Value + "\">空运运价</a>"; } if (type == "10") { Literal1.Text = "<a href=\"hitindex.aspx?u=" + u + "&type=8<ime1=" + BasicDatePicker1_TextBox.Value + "<ime2=" + BasicDatePicker2_TextBox.Value + "\">整箱运价</a>" + " <a href=\"hitindex.aspx?u=" + u + "&type=9<ime1=" + BasicDatePicker1_TextBox.Value + "<ime2=" + BasicDatePicker2_TextBox.Value + "\">拼箱运价</a>" + " 空运运价"; } sql = "SELECT dateparts,(CASE WHEN C IS NULL THEN 0 ELSE C END) AS c "; sql = sql + "FROM (SELECT CONVERT(varchar(20), NowTime, 23) AS dateday, "; sql = sql + "COUNT(CONVERT(varchar(20), NowTime, 23)) AS c "; sql = sql + "FROM TB_FREIGHT_VIEWRECORD "; sql = sql + "WHERE (yuserid = " + u + ") AND (freight_type = " + type + ") "; sql = sql + "GROUP BY CONVERT(varchar(20), NowTime, 23)) T1 RIGHT OUTER JOIN "; sql = sql + "(SELECT CONVERT(varchar(20), the_date, 23) AS dateparts "; sql = sql + "FROM TB_Time_Dimension AS dateparts) T2 ON T1.dateday = T2.dateparts WHERE 1=1 "; sql = sql + sqldate1; sql = sql + sqldate2; sql = sql + "order by dateparts "; } else { PlaceHolder1.Visible = false; string[] k; k = new string[100]; AllinFreight AllinFreight1 = new AllinFreight(); k = AllinFreight1.GetFreightDetail("8", f1, "0"); string avg = ""; Literal3.Text = "相关运价:" + k[35]; Literal3.Text += " (" + k[2] + "," + k[3] + "起运,该条航线全站平均点击量(该功能建设中)" + avg + ")"; sql = "SELECT dateparts,(CASE WHEN C IS NULL THEN 0 ELSE C END) AS c "; sql = sql + "FROM (SELECT CONVERT(varchar(20), NowTime, 23) AS dateday, "; sql = sql + "COUNT(CONVERT(varchar(20), NowTime, 23)) AS c "; sql = sql + "FROM TB_FREIGHT_VIEWRECORD "; sql = sql + "WHERE (freight_code = " + f1 + ") AND (freight_type = " + type + ") "; sql = sql + "GROUP BY CONVERT(varchar(20), NowTime, 23)) T1 RIGHT OUTER JOIN "; sql = sql + "(SELECT CONVERT(varchar(20), the_date, 23) AS dateparts "; sql = sql + "FROM TB_Time_Dimension AS dateparts) T2 ON T1.dateday = T2.dateparts WHERE 1=1 "; sql = sql + sqldate1; sql = sql + sqldate2; sql = sql + "order by dateparts "; if (GetRequest1.GetRequestCookies("admin_group", "3").ToString() != "3") { string sqldetail = ""; PlaceHolder2.Visible = true; sqldetail = ""; sqldetail += "SELECT TB_FREIGHT_VIEWRECORD.NowTime,TB_USER.Realname,TB_USER.Companyname "; sqldetail += "FROM TB_FREIGHT_VIEWRECORD INNER JOIN TB_USER ON TB_FREIGHT_VIEWRECORD.userid = TB_USER.userid "; sqldetail += "WHERE (freight_code = " + f1 + ") AND (freight_type = " + type + ") "; sqldetail = sqldetail + sqldate3; sqldetail = sqldetail + sqldate4; sqldetail = sqldetail + "ORDER BY TB_FREIGHT_VIEWRECORD.id DESC "; ds = cn.mdb_ds(sqldetail, "view1"); //Response.Write(sqldetail); Repeater3.DataSource = ds.Tables["view1"].DefaultView; Repeater3.DataBind(); } } //Response.Write(sql); ds = cn.mdb_ds(sql, "view"); for (int i = 0; i < ds.Tables["view"].Rows.Count; i++) { if (hitmax < Convert.ToInt32(ds.Tables["view"].Rows[i]["c"].ToString())) { hitmax = Convert.ToInt32(ds.Tables["view"].Rows[i]["c"].ToString()); } hitcount += Convert.ToInt32(ds.Tables["view"].Rows[i]["c"].ToString()); } Literal2.Text = hitcount.ToString(); Repeater1.DataSource = ds.Tables["view"].DefaultView; Repeater1.DataBind(); if (top == "0") { } sql = ""; sql += "SELECT TB_FREIGHT_VIEWRECORD.freight_code as id,title,postdate,enddate,hangxianmiaoshu,startport,order_adv,count(TB_FREIGHT_VIEWRECORD.freight_code) as c,'?f1='+ convert(nvarchar(50),TB_FREIGHT_VIEWRECORD.freight_code,112) + '&type=" + type + "<ime1=" + ltime1 + "<ime2=" + ltime2 + "' AS qs "; sql += "FROM TB_FREIGHT_VIEWRECORD left join TB_Yunjia on TB_Yunjia.id = TB_FREIGHT_VIEWRECORD.freight_code "; sql += "WHERE (yuserid = " + u + ") AND (freight_type = " + type + ") "; sql = sql + sqldate3; sql = sql + sqldate4; sql = sql + "group by TB_FREIGHT_VIEWRECORD.freight_code,title,postdate,enddate,hangxianmiaoshu,startport,order_adv "; sql = sql + "ORDER BY postdate "; //Response.Write(sql); ds = cn.mdb_ds(sql, "view"); Repeater2.DataSource = ds.Tables["view"].DefaultView; Repeater2.DataBind(); }
public void LoadSavedOrder() { check ck = new check(); data_conn cn = new data_conn(); DataSet ds = new DataSet(); GetRequest GetRequest1 = new GetRequest(); string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0")); string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0")); string role = GetRequest1.GetRequestQueryString("role", ""); AllinOrder AllinOrder1 = new AllinOrder(); string[] odetail; odetail = AllinOrder1.GetOrderDetail(orderid); ltrOrderViewCode.Text = odetail[0]; ltrOrderViewShipper.Text = odetail[8]; ltrOrderViewConsignee.Text = odetail[9]; ltrOrderViewNotifyParty.Text = odetail[10]; ltrOrderViewCompanyName.Text = odetail[11]; ltrOrderViewEmail.Text = odetail[12]; ltrOrderViewContactor.Text = odetail[13]; ltrOrderViewMobile.Text = odetail[14]; ltrOrderViewTel.Text = odetail[15]; ltrOrderViewFax.Text = odetail[16]; ltrOrderViewStartport.Text = odetail[17]; ltrOrderViewMidport.Text = odetail[18]; ltrOrderViewDestport.Text = odetail[19]; ltrOrderViewMarksNumbers.Text = odetail[20]; ltrOrderViewNumbersofPackages.Text = odetail[21]; ltrOrderViewDescription.Text = odetail[22]; ltrOrderViewGrossWeight.Text = odetail[23]; ltrOrderViewMeasurement.Text = odetail[24]; ltrOrderViewCarrier.Text = odetail[26]; ltrOrderViewKaihangri.Text = odetail[27]; ltrOrderViewZhuangxiangri.Text = odetail[28]; ltrOrderViewJieguanri.Text = odetail[29]; ltrOrderViewGP.Text = odetail[34]; ltrFreightGP.Text = odetail[49]; ltrFreightGPV.Text = odetail[50]; ltrFreightAppend.Text = odetail[44]; ltrFreightCarrier.Text = odetail[68]; ltrOrderViewHyf.Text = odetail[59]; ltrOrderViewBeizhu.Text = odetail[36]; ltrOverageThis.Text = odetail[62]; txt_edit_pricegp.Text = odetail[49]; txt_edit_pricegpv.Text = odetail[50]; txt_edit_price_shipcompany.Text = odetail[68]; if (odetail[44] != "") { ltrOrderFujiafei.Text = "(附加费:" + odetail[44] + ")"; } SetStep(odetail[1], odetail[37], odetail[38]); if (u != odetail[3] & u != odetail[4]) { Response.Redirect("/search/err.aspx"); }//不是买卖双方的用户无法查看该订单! string order_type_string = odetail[58]; if (role == "shipper") { PlaceHolder3.Visible = true; ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:left; background:#FFFCF3;border:1px solid #F7E4A5;\">" + odetail[89].Replace("{1}", orderid).Replace("{9}", order_type_string) + "</div>"; if (u != odetail[3]) { Response.Redirect("/search/err.aspx"); }//不是买卖双方的用户无法查看该订单! }//订舱方显示的文本 if (role == "forward") { PlaceHolder4.Visible = true; ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:left; background:#FFFCF3;border:1px solid #F7E4A5;\">" + odetail[90].Replace("{1}", orderid).Replace("{9}", order_type_string) + "</div>"; if (u != odetail[4]) { Response.Redirect("/search/err.aspx"); }//不是买卖双方的用户无法查看该订单! if (odetail[1] != "2") { phEditDisabled.Visible = true; phEditEnabled.Visible = false; } else { phEditDisabled.Visible = false; phEditEnabled.Visible = true; } }//承运方显示的文本 if (odetail[1] != "2") { PlaceHolder2.Visible = false; PlaceHolder1.Visible = false; } ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>"; AllinFreight AllinFreight1 = new AllinFreight(); string[] fdetail; if (odetail[7] == "0") { fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0"); } else { fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7])); } ltrEndDate.Text = Convert.ToDateTime(fdetail[6]).ToString("yyyy-MM-dd"); ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>"; ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd"); ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd"); ltrFreightCompany.Text = fdetail[18]; ltrFreightAllinStar.Text = fdetail[19]; ltrFreightUserStar.Text = fdetail[20]; ltrFreightLine.Text = odetail[69]; ltrFreightStartport.Text = odetail[70]; ltrFreightDestport.Text = odetail[71]; ltrFreightAssuranceSpace.Text = odetail[100]; ltrFreightAssurancePrice.Text = odetail[101]; lblTousu.Text = fdetail[18]; AllinUser AllinUser1 = new AllinUser(); string[] udetail; udetail = AllinUser1.GetUserDetail(u); txtbank.Value = udetail[50]; txtbankname.Value = udetail[51]; txtbankaccount.Value = udetail[52]; txtotheraccount.Value = udetail[53]; ltrOverageTotal.Text = udetail[55]; ltrOverageAvailable.Text = (Convert.ToInt32(ltrOverageTotal.Text) - Convert.ToInt32(ltrOverageThis.Text)).ToString(); ltrPayJump.Text = "<a href=\"/member/order/pay_sel_single.aspx?orderid=" + orderid + "\">立即充值</a>"; //if (Convert.ToInt32(ltrOverageTotal.Text) - Convert.ToInt32(ltrOverageThis.Text) >= 0) //{ // PlaceHolder8.Visible = true; // PlaceHolder9.Visible = false; // PlaceHolder10.Visible = true; // PlaceHolder11.Visible = false; //} //else //{ // PlaceHolder8.Visible = false; // PlaceHolder9.Visible = true; // PlaceHolder10.Visible = false; // PlaceHolder11.Visible = true; //} PlaceHolder8.Visible = true; PlaceHolder9.Visible = false; PlaceHolder10.Visible = true; PlaceHolder11.Visible = false; }
public void LoadEditOrder() { check ck = new check(); data_conn cn = new data_conn(); DataSet ds = new DataSet(); GetRequest GetRequest1 = new GetRequest(); string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0")); string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0")); string role = GetRequest1.GetRequestQueryString("role", ""); AllinOrder AllinOrder1 = new AllinOrder(); string[] odetail; odetail = AllinOrder1.GetOrderDetail(orderid); ltrHyf.Text = odetail[59]; txtPubf.Text = odetail[4]; txtCode.Value = odetail[0]; txtShipper.Value = odetail[8]; txtConsignee.Value = odetail[9]; txtNotifyParty.Value = odetail[10]; txtCompanyName.Value = odetail[11]; txtEmail.Value = odetail[12]; txtContactor.Value = odetail[13]; txtMobile.Value = odetail[14]; txtTel.Value = odetail[15]; txtFax.Value = odetail[16]; txtstartport.Value = odetail[17]; txtmidport.Value = odetail[18]; txtdestport.Value = odetail[19]; txtMarksNumbers.Value = odetail[20]; txtNumbersofPackages.Value = odetail[21]; txtDescription.Value = odetail[22]; txtGrossWeight.Value = odetail[23]; txtMeasurement.Value = odetail[24]; txtkaihangri.Value = odetail[27]; txtzhuangxiangri.Value = odetail[28]; txtjieguanri.Value = odetail[29]; ltrEndDate.Text = odetail[105]; txtcarrier_name.Value = odetail[26]; ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>"; txtgp.Value = odetail[34]; if (odetail[44] != "") { ltrOrderFujiafei1.Text = "(附加费:" + odetail[44] + ")"; } ltrFreightGP.Text = odetail[49]; ltrFreightGPV.Text = odetail[50]; ltrFreightAppend.Text = odetail[44]; ltrFreightCarrier.Text = odetail[68]; txtbeizhu.Value = odetail[36]; SetStep(odetail[1], odetail[37], odetail[38]); ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>"; if (u != odetail[3]) { Response.Redirect("/search/err.aspx"); }//不是买方的用户无修改订单! if (odetail[1] != "2" & odetail[1] != "3" & odetail[1] != "7") { Response.Redirect("/search/err.aspx"); }//排除不能修改的订单状态! ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:center; background:#FFFCF3;border:1px solid #F7E4A5;\">修改订舱单</div>"; AllinFreight AllinFreight1 = new AllinFreight(); string[] fdetail; if (odetail[7] == "0") { fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0"); } else { fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7])); } ltrEndDate.Text = Convert.ToDateTime(fdetail[6]).ToString("yyyy-MM-dd"); ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>"; ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd"); ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd"); ltrFreightCompany.Text = fdetail[18]; ltrFreightAllinStar.Text = fdetail[19]; ltrFreightUserStar.Text = fdetail[20]; ltrFreightLine.Text = odetail[69]; ltrFreightStartport.Text = odetail[70]; ltrFreightDestport.Text = odetail[71]; ltrFreightAssuranceSpace.Text = odetail[100]; ltrFreightAssurancePrice.Text = odetail[101]; lblTousu.Text = fdetail[18]; AllinUser AllinUser1 = new AllinUser(); string[] udetail; udetail = AllinUser1.GetUserDetail(u); txtbank.Value = udetail[50]; txtbankname.Value = udetail[51]; txtbankaccount.Value = udetail[52]; txtotheraccount.Value = udetail[53]; txtaliaccount.Value = udetail[9]; }
public void LoadSavedOrder() { check ck = new check(); data_conn cn = new data_conn(); DataSet ds = new DataSet(); GetRequest GetRequest1 = new GetRequest(); string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0")); string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0")); string role = GetRequest1.GetRequestQueryString("role", ""); AllinOrder AllinOrder1 = new AllinOrder(); string[] odetail; odetail = AllinOrder1.GetOrderDetail(orderid); ltrOrderViewCode.Text = odetail[0]; ltrOrderViewShipper.Text = odetail[8]; ltrOrderViewConsignee.Text = odetail[9]; ltrOrderViewNotifyParty.Text = odetail[10]; ltrOrderViewCompanyName.Text = odetail[11]; ltrOrderViewEmail.Text = odetail[12]; ltrOrderViewContactor.Text = odetail[13]; ltrOrderViewMobile.Text = odetail[14]; ltrOrderViewTel.Text = odetail[15]; ltrOrderViewFax.Text = odetail[16]; ltrOrderViewStartport.Text = odetail[17]; ltrOrderViewMidport.Text = odetail[18]; ltrOrderViewDestport.Text = odetail[19]; ltrOrderViewMarksNumbers.Text = odetail[20]; ltrOrderViewNumbersofPackages.Text = odetail[21]; ltrOrderViewDescription.Text = odetail[22]; ltrOrderViewGrossWeight.Text = odetail[23]; ltrOrderViewMeasurement.Text = odetail[24]; ltrOrderViewCarrier.Text = odetail[26]; ltrOrderViewKaihangri.Text = odetail[27]; ltrOrderViewZhuangxiangri.Text = odetail[28]; ltrOrderViewJieguanri.Text = odetail[29]; ltrOrderViewGP.Text = odetail[34]; ltrFreightGP.Text = odetail[49]; ltrFreightGPV.Text = odetail[50]; ltrFreightAppend.Text = odetail[44]; ltrFreightCarrier.Text = odetail[26]; ltrOrderViewHyf.Text = odetail[59]; ltrOrderViewBeizhu.Text = odetail[36]; if (odetail[44] != "") { ltrOrderFujiafei.Text = "(附加费:" + odetail[44] + ")"; } string order_type_string = odetail[58]; ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>"; AllinFreight AllinFreight1 = new AllinFreight(); string[] fdetail; if (odetail[7] == "0") { fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0"); } else { fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7])); } ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>"; ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd"); ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd"); ltrFreightCompany.Text = fdetail[18]; ltrFreightAllinStar.Text = fdetail[19]; ltrFreightUserStar.Text = fdetail[20]; ltrFreightLine.Text = odetail[69]; ltrFreightStartport.Text = odetail[70]; ltrFreightDestport.Text = odetail[71]; ltrFreightAssuranceSpace.Text = odetail[100]; ltrFreightAssurancePrice.Text = odetail[101]; ltrOrderFirstStep.Text = odetail[2] + ":订舱方 " + odetail[107] + " 创建订单"; string sql = ""; sql += "SELECT * FROM TB_ORDER_DETAIL WHERE order_code = '" + orderid + "'"; ds = cn.mdb_ds(sql, "order"); rptOrder.DataSource = ds.Tables["order"].DefaultView; rptOrder.DataBind(); }