protected void Page_Load(object sender, EventArgs e) { if (WebLoginHelper.IsLogin()) { if (WebLoginHelper.IsAuthority(AdminAuth.AdminManage)) { hMainTitle.InnerHtml = WebLoginHelper.GetAdminName(); } if (WebLoginHelper.IsAuthority(AdminAuth.BackgroundManage)) { hMainTitle.InnerHtml = WebLoginHelper.GetAdminName();; } if (WebLoginHelper.IsAuthority(AdminAuth.GoodsManage)) { hMainTitle.InnerHtml = WebLoginHelper.GetAdminName();; } string hrefUrl = string.Empty; string hrefUrl_1 = string.Empty; int order_Count = GetOrderInfoToDelivery(out hrefUrl); int backOrder_Count = GetReBackOrderToChangeGoods(out hrefUrl_1); int theMsgCount = 0;//提醒事件总和 deliveryOrder.Attributes.Add("href", hrefUrl); orderCount.InnerHtml = Convert.ToString(order_Count); deliverReBack.Attributes.Add("href", hrefUrl_1); changeGoods.InnerHtml = Convert.ToString(backOrder_Count); theMsgCount += order_Count > 0 ? 1 : 0; theMsgCount += backOrder_Count > 0 ? 1 : 0; msgCount.InnerHtml = Convert.ToString(theMsgCount); } aExit.HRef = "javascript:;"; aExit.Attributes.Add("data-toggle", "modal"); aExit.Attributes.Add("data-target", "#confirmModal"); aExit.Attributes.Add("onclick", "ExitConfirm()"); }
protected void Page_Load(object sender, EventArgs e) { if (!WebLoginHelper.IsLogin()) { Response.Redirect("/web/web_admin_login.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { if (WebLoginHelper.IsLogin()) { if (WebLoginHelper.IsAuthority(AdminAuth.AdminManage)) { hMainTitle.InnerHtml = WebLoginHelper.GetAdminName(); } if (WebLoginHelper.IsAuthority(AdminAuth.BackgroundManage)) { hMainTitle.InnerHtml = WebLoginHelper.GetAdminName();; } if (WebLoginHelper.IsAuthority(AdminAuth.GoodsManage)) { hMainTitle.InnerHtml = WebLoginHelper.GetAdminName();; } string hrefUrl = string.Empty; int order_Count = GetOrderInfoToDelivery(out hrefUrl); deliveryOrder.Attributes.Add("href", hrefUrl); orderCount.InnerHtml = Convert.ToString(order_Count); if (order_Count > 0) { msgCount.InnerHtml = "1"; } else { msgCount.InnerHtml = "0"; } } aExit.HRef = "javascript:;"; aExit.Attributes.Add("data-toggle", "modal"); aExit.Attributes.Add("data-target", "#confirmModal"); aExit.Attributes.Add("onclick", "ExitConfirm()"); }
protected void Page_Load(object sender, EventArgs e) { if (WebLoginHelper.IsLogin()) { Response.Redirect("/web/mall_Index.aspx?", false); } else { //Session.Abandon();//清除全部Session(在载入登录页的时候就要将所有的SESSION进行清除) } }
protected void Page_Load(object sender, EventArgs e) { if (WebLoginHelper.IsLogin()) { try { string name = Server.UrlDecode(Request.QueryString["name"].Trim()); string number = Request.QueryString["number"].Trim(); string typeCom = string.Empty; string tempKey = string.Empty; object tempValue = string.Empty; if (!string.IsNullOrEmpty(name) && !string.IsNullOrEmpty(number)) { switch (name) { case "德邦物流": typeCom = "debangwuliu"; break; case "申通快递": typeCom = "shentong"; break; case "汇通快递": typeCom = "huitongkuaidi"; break; case "佳吉物流": typeCom = "jiajiwuliu"; break; case "天地华宇": typeCom = "tiandihuayu"; break; case "天天快递": typeCom = "tiantian"; break; case "圆通快递": typeCom = "yuantong"; break; case "韵达快递": typeCom = "yunda"; break; case "宅急送": typeCom = "zhaijisong"; break; case "中铁快运": typeCom = "zhongtiewuliu"; break; case "中通快递": typeCom = "zhongtong"; break; case "顺丰快递": typeCom = "shunfeng"; break; default: typeCom = string.Empty; break; } //string url_1 = string.Format("https://m.kuaidi100.com/autonumber/auto?num={0}",number); 根据订单号获取快递名称英文简称 if (!string.IsNullOrEmpty(typeCom))//如果不为空的情况下调用接口获取json数据 { string url = string.Format("https://m.kuaidi100.com/query?type={0}&postid={1}", typeCom, number); string resInfo = ToolHelper.Post(url, string.Empty); JavaScriptSerializer serializer = new JavaScriptSerializer(); StringBuilder liHtml = new StringBuilder(); if (!string.IsNullOrEmpty(resInfo)) { Dictionary <string, dynamic> dic = serializer.Deserialize <Dictionary <string, dynamic> >(resInfo); if (dic.TryGetValue("message", out tempValue)) { if (Convert.ToString(tempValue) == "ok" && dic.TryGetValue("data", out tempValue)) { if (tempValue != null) { tempValue = serializer.Serialize(tempValue); LogisticalInfo[] logisticalInfo = serializer.Deserialize <LogisticalInfo[]>(Convert.ToString(tempValue)); if (logisticalInfo != null && logisticalInfo.Length > 0) { foreach (var item in logisticalInfo) { liHtml.Append("<li><span>" + item.time + "</span>"); liHtml.Append("<strong>" + item.context + "</strong></li>"); } } } } } showLogistical.InnerHtml = liHtml.ToString(); } } } } catch { } } }