Ejemplo n.º 1
0
 private void dgvList_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     var column = dgvList.Columns[e.ColumnIndex];
     FullFollowup row = dgvList.Rows[e.RowIndex].DataBoundItem as FullFollowup;
     switch (column.Name)
     {
         case "楼盘名称":
             ViewBuilding viewbuilding = new ViewBuilding();
             viewbuilding.Token = Token;
             viewbuilding.Building = row.Building;
             viewbuilding.Show();
             break;
         case "房间名称":
             ViewHouse viewhouse = new ViewHouse();
             viewhouse.Buildings = _buildings;
             viewhouse.House = new FullHouse { House = row.House as DisplayHouse, Customer = row.Owner, Building = row.Building, Owner = row.User, };
             viewhouse.Token = this.Token;
             viewhouse.Show();
             break;
         case "业主信息":
             ViewCustomer form = new ViewCustomer();
             form.Customer = row.Owner;
             form.Show(this);
             break;
         case "跟进信息":
             ViewFollowup viewfollowup = new ViewFollowup();
             viewfollowup.Remark = row.Followup.Remark;
             viewfollowup.Show(this);
             break;
     }
 }
Ejemplo n.º 2
0
        private void dgvList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dgvList.CurrentRow == null) return;
            FullHouse house = dgvList.CurrentRow.DataBoundItem as FullHouse;
            switch (dgvList.Columns[e.ColumnIndex].Name)
            {
                case "房间名称":
                    ViewHouse viewhouse = new ViewHouse();
                    viewhouse.Buildings = _buildings;
                    viewhouse.House = house;
                    viewhouse.Token = this.Token;
                    viewhouse.Show();
                    break;
                case "楼盘名称":
                    ViewBuilding viewbuilding = new ViewBuilding();
                    viewbuilding.Token = Token;
                    viewbuilding.Building = house.Building;
                    viewbuilding.Show();
                    break;
                case "租客":
                    ViewCustomer viewcustomer = new ViewCustomer();
                    viewcustomer.Customer = house.Renter;
                    viewcustomer.Token = this.Token;
                    viewcustomer.Show();
                    break;

            }
        }
Ejemplo n.º 3
0
 private void dgvHouse_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvHouse.CurrentRow == null) return;
     FullHouse house = dgvHouse.CurrentRow.DataBoundItem as FullHouse;
     switch (dgvHouse.Columns[e.ColumnIndex].Name)
     {
         case "业主信息":
             ViewCustomer customer = new ViewCustomer();
             customer.Customer = house.Customer;
             customer.Show();
             break;
         case "房间名称":
             var building = _selectedNode.Tag as FullBuilding;
             ViewHouse viewhouse = new ViewHouse();
             viewhouse.Token = Token;
             viewhouse.BuildingID = building.ID;
             viewhouse.Buildings = _buildings;
             viewhouse.House = house;
             viewhouse.Show();
             break;
     }
 }