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.
66 lines
2.4 KiB
C#
66 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using DSWeb.EntityDA;
|
|
using System.Data;
|
|
|
|
namespace DSWeb.SeanInfo
|
|
{
|
|
public partial class SeanGetAddress : System.Web.UI.Page
|
|
{
|
|
T_ALL_DA tallda = new T_ALL_DA();
|
|
string shortname = "";
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
if (Request["custshortname"].ToString() != "")
|
|
{
|
|
shortname = Request["custshortname"].ToString();
|
|
}
|
|
if (!IsPostBack)
|
|
{
|
|
this.getcustomeeshortname(shortname);
|
|
}
|
|
}
|
|
private void getcustomeeshortname(string shortname)
|
|
{
|
|
string loadaddress = "";
|
|
string deliveraddress = "";
|
|
string[] load;
|
|
string[] deliver;
|
|
string codename = tallda.GetStrSQL("codename", "select codename from info_client where SHORTNAME='" + shortname + "'");
|
|
DataSet ds = tallda.GetInfoShipper(codename);
|
|
listbox_loadd.Items.Clear();
|
|
listbox_deliver.Items.Clear();
|
|
if (ds != null)
|
|
{
|
|
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
|
{
|
|
loadaddress += ds.Tables[0].Rows[i]["LOADADDRESS"].ToString().Replace("\r\n", "$") + "$";
|
|
deliveraddress += ds.Tables[0].Rows[i]["DELIVERADDRESS"].ToString().Replace("\r\n", "$") + "$";
|
|
}
|
|
loadaddress = loadaddress.Remove(loadaddress.Length - 1, 1);
|
|
deliveraddress = deliveraddress.Remove(deliveraddress.Length - 1, 1);
|
|
load = loadaddress.Split('$');
|
|
deliver = deliveraddress.Split('$');
|
|
for (int m = 0; m < load.Length; m++)
|
|
{
|
|
if (load[m].ToString() != "")
|
|
{
|
|
listbox_loadd.Items.Add(new ListItem(load[m].ToString(), load[m].ToString()));
|
|
}
|
|
}
|
|
for (int j = 0; j < deliver.Length; j++)
|
|
{
|
|
if (deliver[j].ToString() != "")
|
|
{
|
|
listbox_deliver.Items.Add(new ListItem(deliver[j].ToString(), deliver[j].ToString()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |