protected void Page_Load(object sender, EventArgs e) { Response.Expires = -1; if (Request.QueryString["ImageID"] != null) { TDTK.IndustryPlatform.CoalTraffic.BLL.TT_LoadWeight bll = new TDTK.IndustryPlatform.CoalTraffic.BLL.TT_LoadWeight(); DataRow myRow; byte[] myData = new byte[0]; DataTable db = bll.GetList("Sys_FileSave", " FileCode='" + Request.QueryString["ImageID"].ToString() + "'").Tables[0]; if (db != null && db.Rows.Count != 0) { myRow = db.Rows[0]; if (myRow["FileContent"].ToString() != "") myData = (byte[])myRow["FileContent"]; if (myRow["FileType"].ToString() != "") Response.ContentType = myRow["FileType"].ToString(); else Response.ContentType = "jpg"; Response.BinaryWrite(myData); } } }
private void ShowInfo(string LoadWeightID) { TDTK.IndustryPlatform.CoalTraffic.BLL.TT_LoadWeight bll = new TDTK.IndustryPlatform.CoalTraffic.BLL.TT_LoadWeight(); TDTK.IndustryPlatform.CoalTraffic.Model.TT_LoadWeight model = bll.GetModel(LoadWeightID); this.lblTrafficCode.Text = model.TrafficCode; this.lblWeightCode.Text = model.WeightCode; this.lblMarkedCardCode.Text = model.MarkedCardCode; this.lblCollName.Text = model.CollName; this.lblKindName.Text = model.CoalKindName; this.lblCarOwnerName.Text = model.CarOwnerName; this.lblCarNo.Text = model.CarNo; this.lblCarType.Text = model.CarType; this.lblLoadWeight.Text = model.LoadWeight.ToString() + " 吨"; this.lblEmptyWeight.Text = model.EmptyWeight.ToString() + " 吨"; this.lblNetWeight.Text = model.NetWeight.ToString() + " 吨"; this.lblOverWeight.Text = model.OverWeight.ToString() + " 吨"; this.lblTaxAmount.Text = model.TaxAmount.ToString() + " 元"; this.lblRoomCode.Text = model.RoomName; this.lblBangType.Text = model.BangType; this.lblOperator.Text = model.Operator; this.lblWeightTime.Text = model.WeightTime.ToString(); //this.lblPitheadWeight.Text = model.PitheadWeight.ToString(); //this.lblPitheadBillCode.Text = model.PitheadBillCode; this.lblCustomerName.Text = model.CustomerName; this.lblTaxType.Text = model.TaxType == "1" ? "散煤正常扣税" : "散煤补扣税"; //this.lblCoalHeight.Text = model.CoalHeight.ToString(); //this.lblRouteNo.Text = model.RouteNo; //this.lblInspector.Text = model.Inspector; this.lblIsFirstSite.Text = model.IsFirstSite=="1"?"是":"否"; string strIsHaveVideo = ConfigurationManager.AppSettings["IsHaveVideo"]; if (strIsHaveVideo == "1") { this.lblFrontImage.Text = model.FrontImage; this.lblBackImage.Text = model.BackImage; this.lblUpImage.Text = model.UpImage; this.lblRoomImage.Text = model.RoomImage; //生成图片 if ("" != lblFrontImage.Text.Trim()) imgFrontImage.ImageUrl = "show.aspx?ImageID=" + lblFrontImage.Text; else imgFrontImage.ImageUrl = "../Images/NoPhoto.jpg"; if ("" != lblBackImage.Text.Trim()) imgBackImage.ImageUrl = "show.aspx?ImageID=" + lblBackImage.Text; else imgBackImage.ImageUrl = "../Images/NoPhoto.jpg"; if ("" != lblUpImage.Text.Trim()) imgUpImage.ImageUrl = "show.aspx?ImageID=" + lblUpImage.Text; else imgUpImage.ImageUrl = "../Images/NoPhoto.jpg"; if (this.lblRoomImage.Text.Trim() != "") imgRoomImage.ImageUrl = "show.aspx?ImageID=" + this.lblRoomImage.Text; else imgRoomImage.ImageUrl = "../Images/NoPhoto.jpg"; } else { this.trVideo1.Visible = false; this.trVideo2.Visible = false; this.trVideo3.Visible = false; this.trVideo4.Visible = false; } }