|
|
|
|
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.Text;
|
|
|
|
|
using DSWeb.DataAccess;
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
using DSWeb.Models;
|
|
|
|
|
using DSWeb.EntityDA;
|
|
|
|
|
using System.Web.Script.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Shipping
|
|
|
|
|
{
|
|
|
|
|
public partial class ExchangesUnitRepeat : System.Web.UI.Page
|
|
|
|
|
{
|
|
|
|
|
public string strHandleType = String.Empty;
|
|
|
|
|
public string sSQL = String.Empty;
|
|
|
|
|
public string gvid = String.Empty;
|
|
|
|
|
public string strUserID = String.Empty;
|
|
|
|
|
public string strShowName = String.Empty;
|
|
|
|
|
T_ALL_DA T_ALL_DA = new T_ALL_DA();
|
|
|
|
|
MoneyConvert MoneyConvert = new MoneyConvert();
|
|
|
|
|
TopSeaeEntity TopSeaeEntity = new TopSeaeEntity();
|
|
|
|
|
SeaExportInfoDA SeaExportInfoDA = new SeaExportInfoDA();
|
|
|
|
|
RangeDA RangeDA = new RangeDA();
|
|
|
|
|
public int isOpenAnnounce;
|
|
|
|
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (Session["USERID"] != null)
|
|
|
|
|
{
|
|
|
|
|
strUserID = Session["USERID"].ToString();
|
|
|
|
|
this.hdUserID.Value = strUserID;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Server.Transfer("~/Error/FriendError.aspx");
|
|
|
|
|
return;
|
|
|
|
|
//strUserID = "";
|
|
|
|
|
}
|
|
|
|
|
if (Session["SHOWNAME"] != null)
|
|
|
|
|
{
|
|
|
|
|
strShowName = Session["SHOWNAME"].ToString();
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
if (Request.QueryString["id"] != null)//if (Request.QueryString["id"] != null)
|
|
|
|
|
{
|
|
|
|
|
this.hdGid.Value = Request.QueryString["id"].ToString();//"topseaeusername129481962859531250";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
{
|
|
|
|
|
if (this.hdGid.Value.ToString() != "")
|
|
|
|
|
{
|
|
|
|
|
DataSet ds = T_ALL_DA.GetInfoClient(" and GID='" + this.hdGid.Value.ToString() + "'");
|
|
|
|
|
//
|
|
|
|
|
if (ds == null)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (ds.Tables[0].Rows.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
tbCODENAME.Text = ds.Tables[0].Rows[0]["CODENAME"].ToString();
|
|
|
|
|
tbSHORTNAME.Text = ds.Tables[0].Rows[0]["SHORTNAME"].ToString();
|
|
|
|
|
tbDESCRIPTION.Text = ds.Tables[0].Rows[0]["DESCRIPTION"].ToString();
|
|
|
|
|
this.hdyCODENAME.Value = ds.Tables[0].Rows[0]["CODENAME"].ToString();
|
|
|
|
|
this.hdySHORTNAME.Value = ds.Tables[0].Rows[0]["SHORTNAME"].ToString();
|
|
|
|
|
this.hdyDESCRIPTION.Value = ds.Tables[0].Rows[0]["DESCRIPTION"].ToString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//加载下拉框
|
|
|
|
|
Page.ClientScript.RegisterStartupScript(this.GetType(), "key", "<script>initComboCUSTOMERNAME();</script>");
|
|
|
|
|
}
|
|
|
|
|
protected String getBSNO()
|
|
|
|
|
{
|
|
|
|
|
string strBSNO = Guid.NewGuid().ToString();
|
|
|
|
|
strBSNO = strBSNO.Replace("-", "");
|
|
|
|
|
strBSNO = "InfoClient" + strBSNO;
|
|
|
|
|
return strBSNO;
|
|
|
|
|
}
|
|
|
|
|
public bool IsNumeric(string s)
|
|
|
|
|
{
|
|
|
|
|
bool bReturn = true;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
int inum = int.Parse(s);
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
bReturn = false;
|
|
|
|
|
}
|
|
|
|
|
return bReturn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 合并客户 客户合并 往来单位合并 合并往来单位
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sender"></param>
|
|
|
|
|
/// <param name="e"></param>
|
|
|
|
|
protected void btnEnter_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
T_ALL_DA T_ALL_DA = new T_ALL_DA();
|
|
|
|
|
string alt = T_ALL_DA.GetRepeatClient(this.hdGid.Value.ToString(), this.hdyCODENAME.Value.ToString(), this.hdySHORTNAME.Value.ToString(), this.hdyDESCRIPTION.Value.ToString(), this.hdClientID.Value.ToString(), this.hdCODENAME.Value.ToString(), this.hdSHORTNAME.Value.ToString(), this.hdDESCRIPTION.Value.ToString(), strUserID, strShowName);
|
|
|
|
|
//
|
|
|
|
|
lbCODENAME.Text = this.hdCODENAME.Value.ToString();
|
|
|
|
|
lbSHORTNAME.Text = this.hdSHORTNAME.Value.ToString();
|
|
|
|
|
lbDESCRIPTION.Text = this.hdDESCRIPTION.Value.ToString();
|
|
|
|
|
//
|
|
|
|
|
if (alt=="")
|
|
|
|
|
{
|
|
|
|
|
Page.ClientScript.RegisterStartupScript(this.GetType(), "key4", "<script>alert('操作成功!');</script>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Page.ClientScript.RegisterStartupScript(this.GetType(), "key4", "<script>alert('出错,请重新填写!');</script>");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|