| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using WindowsFormsApp1.entity; |
| | | |
| | | namespace WindowsFormsApp1 |
| | | { |
| | |
| | | { |
| | | InitializeComponent(); |
| | | InitSkin(); |
| | | InitData(); |
| | | } |
| | | |
| | | private void SetTableData(List<FirstOrderSunInfo> infoList) { |
| | | this.dataGridView1.Rows.Clear(); |
| | | foreach (FirstOrderSunInfo info in infoList) { |
| | | int index = this.dataGridView1.Rows.Add(); |
| | | this.dataGridView1.Rows[index].Cells[0].Value = "1"; |
| | | this.dataGridView1.Rows[index].Cells[1].Value = info.title; |
| | | this.dataGridView1.Rows[index].Cells[2].Value = info.zkPrice; |
| | | this.dataGridView1.Rows[index].Cells[3].Value = info.couponPrice; |
| | | this.dataGridView1.Rows[index].Cells[4].Value = info.lijinAmount; |
| | | this.dataGridView1.Rows[index].Cells[5].Value = info.actualPrice; |
| | | this.dataGridView1.Rows[index].Cells[6].Value = info.commission; |
| | | this.dataGridView1.Rows[index].Cells[7].Value = info.commissionRate; |
| | | } |
| | | |
| | | foreach (DataGridViewColumn column in dataGridView1.Columns) |
| | | { |
| | | column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; |
| | | } |
| | | |
| | | } |
| | | |
| | | //初始化皮肤颜色 |
| | |
| | | { |
| | | //this.textBox |
| | | |
| | | } |
| | | |
| | | private void InitData() { |
| | | List<FirstOrderSunInfo> infoList = new List<FirstOrderSunInfo>(); |
| | | |
| | | for (int i = 0; i < 10; i++) |
| | | { |
| | | FirstOrderSunInfo info = new FirstOrderSunInfo(); |
| | | info.actualPrice = "12.00"; |
| | | info.commission = "1.02"; |
| | | info.commissionRate = "20%"; |
| | | info.couponPrice = "15.00"; |
| | | info.goodsId = "123456"; |
| | | info.imgList = new List<string>(); |
| | | info.imgList.Add("http://"); |
| | | info.lijinAmount = "20.21"; |
| | | info.title = "测试"; |
| | | info.zkPrice = "21.02"; |
| | | infoList.Add(info); |
| | | } |
| | | SetTableData(infoList); |
| | | } |
| | | |
| | | |