private void Delete() { string guidList = Request.Params["Guid"]; string rslt = string.Empty; if (!string.IsNullOrEmpty(guidList)) { Model.Application apply = new Model.Application(); Model.BulkFreight bulk = new Model.BulkFreight(); Model.SCW scw = new Model.SCW(); string[] guid = guidList.Split(','); foreach (var item in guid) { apply.Guid = item; bulk.AppGuid = item; scw.AppGuid = item; try { CNVP.Data.Application bll = new CNVP.Data.Application(); bll.ApplyDelete(apply, scw, bulk); rslt = "1"; } catch (Exception e) { rslt = "0"; } finally { } } Response.Write("{\"result\":\"" + rslt + "\"}"); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { string bulkList = string.Empty; string AppGuid = Request.Params["AppGuid"]; if (!string.IsNullOrEmpty(AppGuid)) { string content = FileUtils.ReadFile(Server.MapPath("~/Template/SolidBulk.htm")); Hashtable ht = new Hashtable(); ht.Add("Guid", AppGuid); Hashtable ht1 = new Hashtable(); ht1.Add("AppGuid", AppGuid); Model.Application apply = Model.Application.Instance.GetModelById(ht); Model.Accredit accredit = Model.Accredit.Instance.GetModelById(ht1); content = content.Replace("{#ShipName}", GetStr(apply.ShipName)) .Replace("{#Saillings}", GetStr(apply.Saillings)) .Replace("{#IO0}", apply.IO.ToString() == "0" ? "☑" : "□") .Replace("{#StartPort}", GetStr(apply.StartPort)) .Replace("{#ArrivedTime}", GetStr(Convert.ToDateTime(apply.ArrivedTime).ToString("yyyy-MM-dd"))) .Replace("{#Nationality}", GetStr(apply.Nationality)) .Replace("{#Operator}", GetStr(apply.Operator)) .Replace("{#IO1}", apply.IO.ToString() == "1" ? "☑" : "□") .Replace("{#WorkBerth}", GetStr(apply.WorkBerth)) .Replace("{#WorkTime}", GetStr(Convert.ToDateTime(apply.WorkTime).ToString("yyyy-MM-dd"))) .Replace("{#Declarer}", apply.Declarer.ToString() == "" ? GetStr(apply.Ship) : GetStr(apply.Declarer)) .Replace("{#DecCertificateNo}", GetStr(apply.DecCertificateNo)) .Replace("{#CreateTime}", Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")) .Replace("{#EmergencyName}", apply.EmergencyName + "、" + apply.EmergencyTel + "、" + apply.EmergencyFax + "、" + apply.RmergencyEmail); Model.BulkFreight bulk = new Model.BulkFreight(); IList list = bulk.GetAllList(" and AppGuid='" + AppGuid + "'", "Id"); foreach (var item in list) { if (list.IndexOf(item) < 6) { bulkList += "<tr style='mso-yfti-irow:1;height:21.75pt'><td width=206 colspan=2 valign=top style='width:154.25pt;border-top:none;border-left:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext 1.5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).BfGoodsName + "</o:p></span></p></td><td width=95 valign=top style='width:70.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).BfGoodsGroup + "</o:p></span></p></td><td width=92 valign=top style='width:69.0pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).Class + "</o:p></span></p></td><td width=97 colspan=2 valign=top style='width:72.75pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).DangerousNo + "</o:p></span></p></td><td width=123 valign=top style='width:92.1pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).BfTotalWeight + "</o:p></span></p></td><td width=109 valign=top style='width:81.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).DischargingPort + "</o:p></span></p></td><td width=126 colspan=2 valign=top style='width:94.5pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).Position + "</o:p></span></p></td><td width=154 valign=top style='width:115.2pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext 1.5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal align=center style='text-align:center'><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p>" + ((CNVP.Model.BulkFreight)(item)).Remark + "</o:p></span></p></td></tr>"; } } for (int i = 0; i < 6-list.Count; i++) { bulkList += "<tr style='mso-yfti-irow:1;height:21.75pt'><td width=206 colspan=2 valign=top style='width:154.25pt;border-top:none;border-left:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext 1.5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=95 valign=top style='width:70.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=92 valign=top style='width:69.0pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=97 colspan=2 valign=top style='width:72.75pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=123 valign=top style='width:92.1pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=109 valign=top style='width:81.9pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=126 colspan=2 valign=top style='width:94.5pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td><td width=154 valign=top style='width:115.2pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext 1.5pt;padding:0cm 5.4pt 0cm 5.4pt;height:21.75pt'><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;mso-bidi-font-size:12.0pt'><o:p> </o:p></span></p></td></tr>"; } content = content.Replace("{#BulkList}", bulkList); //审批意见 if (accredit != null) { //string xh = string.Empty; //if (apply.PrintNum.Length == 1) //{ // xh = DateTime.Now.ToString("yyyyMMdd") + "0" + apply.PrintNum; //} //else //{ // xh = apply.PrintNum; //} content = content.Replace("{#spyj}", "准予备案"); content = content.Replace("{#spsj}", DateTime.Now.ToString("yyyy-MM-dd")); } Response.Write(content); } }
protected void Page_Load(object sender, EventArgs e) { string Action = Request.Params["Action"]; switch (Action) { case "EditandApply": EditApply(0); break; case "Edit": Edit(); break; } if (!IsPostBack) { #region 当前页面赋值 string guid = Request.Params["guid"]; appState = Request.Params["State"]; appPage = Request.Params["page"]; if (!string.IsNullOrEmpty(guid)) { CNVP.UI.Application _apply = new UI.Application(); if (_apply.ApplyState(guid) != "2" && _apply.ApplyState(guid) != "4") { MessageBox.ShowMessage("申请单当前状态不允许编辑!", "ApplicationList.aspx?State=03c49c0a"); } else { applyGuid = guid; Hashtable ht = new Hashtable(); ht.Add("Guid", guid); Model.Application appli = Model.Application.Instance.GetModelById(ht); appli.SetWebControls(this.Page); IO.SelectedValue = appli.IO.ToString(); applyId = appli.Id.ToString(); //安全适运单 if (appli.IO == 1) { ht.Clear(); ht.Add("AppGuid", guid); Model.SCW scw = Model.SCW.Instance.GetModelById(ht); scw.SetWebControls(this.Page); GoodsGroup.SelectedValue = scw.GoodsGroup; scwId = scw.Id.ToString(); //string[] arr = scw.ExatrCertificate.Split(','); //for (int i = 0; i < arr.Length; i++) //{ // ListItem li = ExatrCertificate.Items.FindByValue(arr[i]); // if (li != null) // { // li.Selected = true; // } //} } //散装货物列表 Model.BulkFreight bulk = new Model.BulkFreight(); IList list = bulk.GetAllList(" and AppGuid='" + guid + "'", "Id"); rptBulk.DataSource = list; rptBulk.DataBind(); //图片附件 mfile0_0 = GetImgUrl("mfile0_0", guid); mfile0_1 = GetImgUrl("mfile0_1", guid); mfile0_2 = GetImgUrl("mfile0_2", guid); mfile0_3 = GetImgUrl("mfile0_3", guid); mfile0_4 = GetImgUrl("mfile0_4", guid); scwmfile1 = GetImgUrl("scwmfile0_1", guid); scwmfile2 = GetImgUrl("scwmfile0_2", guid); scwmfile3 = GetImgUrl("scwmfile0_3", guid); DataTable dt = DataFactory.GetInstance(). ExecuteTable("select * from cnvp_source where appGuid='" + guid + "' and sourcetype like 'mfile0_%' and substring(sourcetype,8,2) > 4"); if (dt != null && dt.Rows.Count > 0) { rptOther.DataSource = dt; rptOther.DataBind(); } DataTable dts = DataFactory.GetInstance(). ExecuteTable("select * from cnvp_source where appGuid='" + guid + "' and sourcetype like 'scwmfile0_%' and substring(sourcetype,11,2) > 3"); if (dts != null && dts.Rows.Count > 0) { scwOthers.DataSource = dts; scwOthers.DataBind(); } } #region 审批意见 DataTable dts1 = DataFactory.GetInstance().ExecuteTable("select * from CNVP_accredit where AppGuid='" + guid + "'"); if (dts1 != null && dts1.Rows.Count > 0) { spyj = dts1.Rows[0]["AppOpinions"].ToString(); } #endregion } #endregion } }
/// <summary> /// 编辑申请单 /// </summary> private void EditApply(int editState) { string applyId = Request.Params["applyId"]; string scwId = Request.Params["scwId"]; string bulkId = Request.Params["bulkId"]; //散装货物表ID 不能传入string类型,新定义一个字段存入ID string applyGuid = Request.Params["applyGuid"]; string appState = Request.Params["appState"]; string appPage = Request.Params["appPage"]; CNVP.UI.FileUpload upload = new UI.FileUpload(); Model.Application appli = new Model.Application(); Model.SCW scw = new Model.SCW(); Model.Source source = new Model.Source(); Model.BulkFreight bulk = new Model.BulkFreight(); //项目申请单 appli.UpdateModel(); appli.Id = Convert.ToInt32(applyId); appli.IO = Convert.ToInt32(IO.SelectedValue); appli.AppState = editState; //安全适运单 if (appli.IO == 1) { CNVP.UI.Application _apply = new UI.Application(); scw.UpdateModel(); //scw.ExatrCertificate = _apply.GetCheck(ExatrCertificate, ","); scw.GoodsGroup = GoodsGroup.SelectedValue; scw.Id = Convert.ToInt32(scwId); } //附件上传 source.AppGuid = applyGuid; //source.CreateTime = DateTime.Now; source.SourceUrl = upload.UploadPic(); source.UserId = Convert.ToInt32(UserLoginInfo.UserLoginID); //散装货物上传 //bulk.Id = Request.Params["bulkId"]; bulk.BfGoodsName = Request.Params["BfGoodsName"]; bulk.BfGoodsGroup = Request.Params["BfGoodsGroup"]; bulk.Class = Request.Params["Class"]; bulk.DangerousNo = Request.Params["DangerousNo"]; bulk.BfTotalWeight = Request.Params["BfTotalWeight"]; bulk.DischargingPort = Request.Params["DischargingPort"]; bulk.Position = Request.Params["Position"]; bulk.Remark = Request.Params["Remark"]; CNVP.Data.Application bll = new CNVP.Data.Application(); bll.Edit(appli, scw, source, bulk, bulkId); MessageBox.ShowMessage("修改提交成功!", "ApplicationList.aspx?State=" + appState + "&page=" + appPage); }
protected void Page_Load(object sender, EventArgs e) { string Action = Request.Params["Action"]; switch (Action) { case "EditState": EditState(); break; } if (!IsPostBack) { #region 当前页面赋值 string guid = Request.Params["guid"]; _appState = Request.Params["State"]; appPage = Request.Params["page"]; if (!string.IsNullOrEmpty(guid)) { applyGuid = guid; Hashtable ht = new Hashtable(); ht.Add("Guid", guid); Model.Application appli = Model.Application.Instance.GetModelById(ht); appli.SetWebControls(this.Page); this.ArrivedTime.Text = Convert.ToDateTime(appli.ArrivedTime).ToString("yyyy-MM-dd"); this.WorkTime.Text = Convert.ToDateTime(appli.WorkTime).ToString("yyyy-MM-dd"); if (appli.IO == 1) { strIO = "出港"; } else { strIO = "进港"; Panel1.Visible = false; } AppState.SelectedValue = appli.AppState.ToString(); //安全适运单 ht.Clear(); ht.Add("AppGuid", guid); Model.SCW scw = Model.SCW.Instance.GetModelById(ht); scw.SetWebControls(this.Page); //散装货物列表 Model.BulkFreight bulk = new Model.BulkFreight(); IList list = bulk.GetAllList(" and AppGuid='" + guid + "'", "Id"); rptBulk.DataSource = list; rptBulk.DataBind(); //图片附件 CNVP.UI.FileUpload _fuplo = new UI.FileUpload(); mfile0_0 = _fuplo.GetImgUrl("mfile0_0", guid); mfile0_1 = _fuplo.GetImgUrl("mfile0_1", guid); mfile0_2 = _fuplo.GetImgUrl("mfile0_2", guid); scwmfile2 = _fuplo.GetImgUrl("scwmfile0_2", guid); scwmfile3 = _fuplo.GetImgUrl("scwmfile0_3", guid); scwmfile4 = _fuplo.GetImgUrl("scwmfile0_4", guid); //显示其它类型的附件 //申报单 string strsql1 = "select * from cnvp_source where appGuid='" + guid + "' and sourcetype like 'mfile0_%' and substring(sourcetype,8,2) > 4"; Model.Source source = new Model.Source(); DataTable dt3 = DataFactory.GetInstance().ExecuteTable(strsql1); if (dt3.Rows.Count > 0) { for (int i = 0; i < dt3.Rows.Count; i++) { this.imgsrc1 += "<a href='" + dt3.Rows[i]["SourceUrl"] + "' target='_blank'>其它" + (i + 1) + "</a> "; } } // 适运单 string strsql2 = "select * from cnvp_source where appGuid='" + guid + "' and sourcetype like 'scwmfile0_%' and substring(sourcetype,11,2) > 3"; Model.Source source1 = new Model.Source(); DataTable dt4 = DataFactory.GetInstance().ExecuteTable(strsql2); if (dt4.Rows.Count > 0) { for (int i = 0; i < dt4.Rows.Count; i++) { this.imgsrc2 += "<a href='" + dt4.Rows[i]["SourceUrl"] + "' target='_blank'>其它" + (i + 1) + "</a> "; } } if (_fuplo.GetImgUrl("mfile0_3", guid) != "") { mfile0_3 = "4、<a href=\"" + _fuplo.GetImgUrl("mfile0_3", guid) + "\" target=\"_blank\">进/出港申报委托书</a> "; } if (_fuplo.GetImgUrl("mfile0_3", guid) != "") { mfile0_4 = "5、<a href=\"" + _fuplo.GetImgUrl("mfile0_4", guid) + "\" target=\"_blank\">保险证书类型</a> "; } if (_fuplo.GetImgUrl("scwmfile0_1", guid) != "") { scwmfile1 = "<a href=\"" + _fuplo.GetImgUrl("scwmfile0_1", guid) + "\" target=\"_blank\">水份含量和适运水份极限证书</a> "; } if (_fuplo.GetImgUrl("scwmfile0_2", guid) != "") { scwmfile2 = "<a href=\"" + _fuplo.GetImgUrl("scwmfile0_1", guid) + "\" target=\"_blank\">安全适运性评估报告</a> "; } if (_fuplo.GetImgUrl("scwmfile0_3", guid) != "") { scwmfile3 = "<a href=\"" + _fuplo.GetImgUrl("scwmfile0_3", guid) + "\" target=\"_blank\">委托书</a> "; } if (_fuplo.GetImgUrl("scwmfile0_4", guid) != "") { scwmfile4 = "<a href=\"other.aspx?AppGuid=" + applyGuid + "\" target=\"_blank\">其它</a>"; } //审批意见信息 Model.Accredit accredit = Model.Accredit.Instance.GetModelById(ht); AppOpinions.Text = accredit.AppOpinions; ScwOpinions.Text = accredit.ScwOpinions; } #endregion } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { #region 当前页面赋值 string guid = Request.Params["guid"]; if (!string.IsNullOrEmpty(guid)) { applyGuid = guid; Hashtable ht = new Hashtable(); ht.Add("Guid", guid); Model.Application appli = Model.Application.Instance.GetModelById(ht); appli.SetWebControls(this.Page); this.ArrivedTime.Text = Convert.ToDateTime(appli.ArrivedTime).ToString("yyyy-MM-dd"); this.WorkTime.Text = Convert.ToDateTime(appli.WorkTime).ToString("yyyy-MM-dd"); if (appli.IO == 1) { strIO = "出港"; } else { strIO = "进港"; Panel1.Visible = false; } if (appli.AppState == 1) { printApply = "<a href=\"solidbulk.aspx?AppGuid=" + guid + "\" target=\"_blank\">打印固体散装货物申报单</a>"; printScw = "<a href=\"scwprint.aspx?AppGuid=" + guid + "\" target=\"_blank\">打印安全适运申报单</a>"; printNotice = "<a href=\"Notice.aspx?AppGuid=" + guid + "\" class=\"btn-submit\" target=\"_blank\">打印审批通知单</a>"; } applyId = appli.Id.ToString(); //安全适运单 ht.Clear(); ht.Add("AppGuid", guid); Model.SCW scw = Model.SCW.Instance.GetModelById(ht); scw.SetWebControls(this.Page); scwId = scw.Id.ToString(); //散装货物列表 Model.BulkFreight bulk = new Model.BulkFreight(); IList list = bulk.GetAllList(" and AppGuid='" + guid + "'", "Id"); rptBulk.DataSource = list; rptBulk.DataBind(); //图片附件 CNVP.UI.FileUpload _fuplo = new UI.FileUpload(); mfile0_0 = _fuplo.GetImgUrl("mfile0_0", guid); mfile0_1 = _fuplo.GetImgUrl("mfile0_1", guid); mfile0_2 = _fuplo.GetImgUrl("mfile0_2", guid); scwmfile2 = _fuplo.GetImgUrl("scwmfile0_2", guid); scwmfile3 = _fuplo.GetImgUrl("scwmfile0_3", guid); scwmfile4 = _fuplo.GetImgUrl("scwmfile0_4", guid); if (_fuplo.GetImgUrl("mfile0_3", guid) != "") { mfile0_3 = "4、<a href=\"" + _fuplo.GetImgUrl("mfile0_3", guid) + "\" target=\"_blank\">进/出港申报委托书</a> "; } if (_fuplo.GetImgUrl("mfile0_4", guid) != "") { mfile0_4 = "5、<a href=\"" + _fuplo.GetImgUrl("mfile0_4", guid) + "\" target=\"_blank\">保险证书类型</a> "; } //显示其它类型的附件 //申报单 string strsql1 = "select * from cnvp_source where appGuid='" + guid + "' and sourcetype like 'mfile0_%' and substring(sourcetype,8,2) > 4"; Model.Source source = new Model.Source(); DataTable dt = DataFactory.GetInstance().ExecuteTable(strsql1); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { this.imgsrc1 += "<a href='" + dt.Rows[i]["SourceUrl"] + "' target='_blank'>其它" + (i + 1) + "</a> "; } } // 适运单 string strsql2 = "select * from cnvp_source where appGuid='" + guid + "' and sourcetype like 'scwmfile0_%' and substring(sourcetype,11,2) > 3"; Model.Source source1 = new Model.Source(); DataTable dt1 = DataFactory.GetInstance().ExecuteTable(strsql2); if (dt1.Rows.Count > 0) { for (int i = 0; i < dt1.Rows.Count; i++) { this.imgsrc2 += "<a href='" + dt1.Rows[i]["SourceUrl"] + "' target='_blank'>其它" + (i + 1) + "</a> "; } } if (_fuplo.GetImgUrl("scwmfile0_1", guid) != string.Empty) { scwmfile1 = "<a href=\"" + _fuplo.GetImgUrl("scwmfile0_1", guid) + "\" target=\"_blank\">水份含量和适运水份极限证书</a> "; } if (_fuplo.GetImgUrl("scwmfile0_2", guid) != "") { scwmfile2 = "<a href=\"" + _fuplo.GetImgUrl("scwmfile0_1", guid) + "\" target=\"_blank\">安全适运性评估报告</a> "; } if (_fuplo.GetImgUrl("scwmfile0_3", guid) != "") { scwmfile3 = "<a href=\"" + _fuplo.GetImgUrl("scwmfile0_3", guid) + "\" target=\"_blank\">委托书</a> "; } //if (_fuplo.GetImgUrl("scwmfile0_4", guid) != "") //{ // scwmfile4 = "<a href=\"other.aspx?AppGuid=" + applyGuid + "\" target=\"_blank\">其它</a>"; //} #region 审批意见 DataTable dts1 = DataFactory.GetInstance().ExecuteTable("select * from CNVP_accredit where AppGuid='" + guid + "'"); if (dts1 != null && dts1.Rows.Count > 0) { spyj = dts1.Rows[0]["AppOpinions"].ToString(); spyj1 = dts1.Rows[0]["ScwOpinions"].ToString(); } #endregion } #endregion } }