protected virtual void Page_Load(object sender, EventArgs e) { Act = HTTPRequest.GetString("Act"); if (this.userid > 0) { if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-1-5-6-1")) { if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-1-5-6-2")) { ShowPrice = true; } bDate = Convert.ToDateTime(((HTTPRequest.GetString("bDate").Trim() != "") ? Convert.ToDateTime(HTTPRequest.GetString("bDate").Trim()) : Convert.ToDateTime(DateTime.Now.Year + "-" + DateTime.Now.Month + "-1")).ToShortDateString() + " 00:00:00"); eDate = Convert.ToDateTime(((HTTPRequest.GetString("eDate").Trim() != "") ? Convert.ToDateTime(HTTPRequest.GetString("eDate").Trim()) : DateTime.Now).ToShortDateString() + " 23:59:59"); ProductID = HTTPRequest.GetInt("ProductID", 0); CostPrice = HTTPRequest.GetInt("CostPrice", 1); StorageID = HTTPRequest.GetInt("StorageID", 0); StorageClassName = Utils.ChkSQL(HTTPRequest.GetString("StorageClassName")); StorageClassNum = HTTPRequest.GetInt("StorageClassNum", 0); S_key = Utils.ChkSQL(HTTPRequest.GetString("S_key")); StorageList = tbStockProductInfo.getStorageNameByClass(StorageClassNum); StorageClassJson = Caches.GetStorageInfoToJson(-1, false, true); if (CostPrice == 1) { ShowPrice = false; } if (Act.IndexOf("Search") > -1) { dSet = Caches.GetProductLogDetails(bDate, eDate, ProductID, CostPrice, StorageID); if (dSet != null) { Product_UPYear = decimal.Parse(dSet.Tables[0].Rows[0][0].ToString()); dList = dSet.Tables[1]; //查询具体数据 yList = dSet.Tables[2]; //年累计 bList = dSet.Tables[3]; //开始月前半部分累计 eList = dSet.Tables[4]; //结束月后半部分累计 } } else { //导出 if (Act.IndexOf("Export") > -1) { dSet = Caches.GetProductLogDetails(bDate, eDate, ProductID, CostPrice, StorageID); if (dSet != null) { Product_UPYear = decimal.Parse(dSet.Tables[0].Rows[0][0].ToString()); dList = dSet.Tables[1]; //查询具体数据 yList = dSet.Tables[2]; //年累计 bList = dSet.Tables[3]; //开始月前半部分累计 eList = dSet.Tables[4]; //结束月后半部分累计 } } } } else { AddErrLine("权限不足!"); } } else { AddErrLine("请先登录!"); SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer())); SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer())); } }