private void Form_ReturnSelected(List <Common.Models.Zone> zones, EventArgs args)
 {
     if (zones != null)
     {
         //转换成CarriageCost
         CarriageCost cost = CarriageCostUtil.ZoneToCarriageCost(zones);
         list.Add(cost);
     }
     this.dataGridView1.DataSource = null;
     if (list != null && list.Count > 0)
     {
         this.dataGridView1.DataSource = list;
     }
 }
 private void Form_EditReturnSelected(List <Common.Models.Zone> zones, EventArgs args)
 {
     if (zones != null)
     {
         //转换成CarriageCost
         CarriageCost cost = CarriageCostUtil.ZoneToCarriageCost(zones);
         cost.Cost = editCost.Cost;
         int index = list.IndexOf(editCost);
         list.Remove(editCost);
         list.Insert(index, cost);
         this.dataGridView1.DataSource = null;
         if (list != null && list.Count > 0)
         {
             this.dataGridView1.DataSource = list;
         }
         // list.Add(cost);
     }
 }
Esempio n. 3
0
        private void SetSelectedTitle()
        { //检查所有
            CarriageCost cost = CarriageCostUtil.ZoneToCarriageCost(resultList);

            skinLabelAreaStr.Text = cost.AreaStr;
        }