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.

128 lines
4.8 KiB
C#

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 ExchangesUnitUpdate : 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
{
}
}
}
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
{
//int inum = 0;
bReturn = false;
}
return bReturn;
}
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(), lbCODENAME.Text.ToString(),lbSHORTNAME.Text.ToString(),lbDESCRIPTION.Text.ToString(), strUserID, strShowName);
//
string alt = T_ALL_DA.GetRepeatClient(this.hdGid.Value.ToString(), this.hdyCODENAME.Value.ToString(), this.hdySHORTNAME.Value.ToString(), this.hdyDESCRIPTION.Value.ToString(), lbCODENAME.Text.ToString(), lbSHORTNAME.Text.ToString(), lbDESCRIPTION.Text.ToString(), strUserID, strShowName);
//
if (alt == "")
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "key4", "<script>alert('操作成功!');window.opener.location.reload();history.back();</script>");
return;
}
else
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "key4", "<script>alert('出错,请重新填写!');</script>");
return;
}
}
}
}