You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Shipping/SeaExportInfoBlissueSurAddi...

98 lines
3.7 KiB
C#

3 years ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DSWeb.EntityDA;
using DSWeb.Models;
using JsonHelper;
using System.Xml;
namespace DSWeb.Shipping
{
public partial class SeaExportInfoBlissueSurAdding : System.Web.UI.Page
{
public string handle = "";
T_ALL_DA T_ALL_DA = new T_ALL_DA();
public string strUserID;//用户GID
protected void Page_Load(object sender, EventArgs e)
{
if (Session["USERID"] != null)
{
strUserID = Session["USERID"].ToString().Trim();
}
else
{
Server.Transfer("~/Error/FriendError.aspx");
return;
//strUserID = "";
}
//
//grid
if (!IsPostBack)
{
//
if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString().Trim() != "") //if (Request.QueryString["id"] != null)
{
ViewState["BSNO"] = Request.QueryString["id"].ToString().Trim();
}
/*
//如果该票货还没有做提单签出,则提示该票尚未收到电放保函,不能电放
string strAction = T_ALL_DA.GetStrSQL("BSNO", "select BSNO from [op_blissue] where BSNO='" + ViewState["BSNO"].ToString().Trim() + "' and BLSTATUS='提单签出' and ISSUETYPE='电放' and DElFLAG=0");
if (strAction.Trim().Equals(""))
{
Response.Write("<script>alert('该票货尚未收到电放保函,不能电放!');window.parent.close();window.close();</script>");
Response.End();
//Response.Close();
return;
}
*/
//
tbDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Trim();
}
}
protected void btnEnter_Click(object sender, EventArgs e)
{
if (ViewState["BSNO"].ToString().Trim() != "")
{
string alt = T_ALL_DA.GetOpBlissueSurInsert(strUserID.Trim(), ViewState["BSNO"].ToString().Trim(), tbDate.Text.Trim(), tbREMARK.Text.Trim());
if (alt == "1")
{
Response.Write("<script>alert('提单签发管理表op_blissue插入(删除回复)操作出错!');history.back();</script>");
return;
}
else if (alt == "2")
{
Response.Write("<script>alert('提单签发管理表op_blissue插入操作出错');window.close();history.back();</script>");
return;
}
else if (alt != "" && alt != "1" && alt != "2")
{
Response.Write("<script>alert('此提单的提单电放已经生成,不再重复生成!');window.close();history.back();</script>");
return;
}
else
{
Response.Write("<script>window.opener.location.reload();window.close();history.back();</script>");
return;
}
}
else
{
Response.Write("<script>alert('提单电放出错!');window.close();history.back();</script>");
return;
}
}
}
}