📄 neworder.ascx.cs
字号:
using System;
using System.Collections;
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 VinciDataAccess.DataAccess;
using VinciDataAccess.Entity;
public partial class UserControl_NewOrder : System.Web.UI.UserControl
{
//客户ID
//客户名称
//订单附录
//订单期限
//private int _CustomerID;
//private string _strCustomerName;
//private string _strOderNote;
//private string _RequireDate;
public string strCustomerName
{
get { return this.drpCustomer.SelectedItem.Text; }
set { this.drpCustomer.SelectedItem.Text = value; }
}
public string CustomerID
{
get { return drpCustomer.SelectedItem.Value; }
set { this.drpCustomer.SelectedItem.Value = value; }
}
public string OderNote
{
get { return this.txtOrderNote.Text; }
set { this.txtOrderNote.Text=value; }
}
public string RequireDate
{
get { return this.txtRequiredDate.Text; }
set { this.txtRequiredDate.Text=value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//显示客户
BindCustomers();
}
}
//显示订单客户的方法
public void BindCustomers()
{
VinciDataAccess.DataAccess.CustomersStore Customers= new CustomersStore();
VinciDataAccess.Entity.CustomersCollection CtmCollection = new CustomersCollection();
CtmCollection = Customers.GetCustomersList();
this.drpCustomer.DataSource = CtmCollection;
this.drpCustomer.DataValueField = "CustomerID";
this.drpCustomer.DataTextField = "CompanyName";
this.drpCustomer.DataBind();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -