public async void District_Change(object sender, LookUpChangeEvent e) { loadingPopup.IsVisible = true; await viewModel.GetWardAsync(); viewModel.Ward = null; loadingPopup.IsVisible = false; }
public async void Province_Change(object sender, LookUpChangeEvent e) { loadingPopup.IsVisible = true; await viewModel.GetDistrictAsync(); viewModel.WardList.Clear(); viewModel.District = null; viewModel.Ward = null; loadingPopup.IsVisible = false; }
public void District_Change(object sender, LookUpChangeEvent e) { if (viewModel.MoiGioiModel.District != null) { viewModel.MoiGioiModel.DistrictId = viewModel.MoiGioiModel.District.Id; } else { viewModel.MoiGioiModel.DistrictId = null; } }
void Gender_Change(object sender, LookUpChangeEvent e) { if (viewModel.GenderSelected != null) { viewModel.User.Sex = (short)viewModel.GenderSelected.Id; } else { viewModel.User.Sex = -1; } }
public async void FilterDistrict_Changed(object sender, LookUpChangeEvent e) { loadingPopup.IsVisible = true; if (viewModel.District.Id == -1) { viewModel.District = null; } await viewModel.LoadOnRefreshCommandAsync(); loadingPopup.IsVisible = false; }
public async void FilterType_Changed(object sender, LookUpChangeEvent e) { if (viewModel.Type.Id == -1) { viewModel.Type = null; } loadingPopup.IsVisible = true; await viewModel.LoadOnRefreshCommandAsync(); loadingPopup.IsVisible = false; }
public void Type_Change(object sender, LookUpChangeEvent e) { if (viewModel.MoiGioiModel.Type != null) { viewModel.MoiGioiModel.TypeId = viewModel.MoiGioiModel.Type.Id; } else { viewModel.MoiGioiModel.TypeId = null; } }
public void Contact_Change(object sender, LookUpChangeEvent e) { if (viewModel.CongViec.Contact != null) { viewModel.CongViec.ContactId = viewModel.CongViec.Contact.Id; } else { viewModel.CongViec.Contact = null; viewModel.CongViec.ContactId = Guid.Empty; } }
public async void Province_Change(object sender, LookUpChangeEvent e) { loadingPopup.IsVisible = true; if (viewModel.Province.Id == -1) { LabelProvince.Text = Language.tinh_thanh; LabelProvince.TextColor = Color.Black; viewModel.Province = null; } else { LabelProvince.Text = viewModel.Province.Name; LabelProvince.TextColor = Color.FromHex("#026294"); } if (CurrentIndex == 0) { if (viewModel.Province == null) { viewModelType0.filterModel.ProvinceId = null; } else { viewModelType0.filterModel.ProvinceId = viewModel.Province.Id; } viewModelType0.filterModel.DistrictId = null; await viewModelType0.LoadOnRefreshCommandAsync(); } else { if (viewModel.Province == null) { viewModelType1.filterModel.ProvinceId = null; } else { viewModelType1.filterModel.ProvinceId = viewModel.Province.Id; } viewModelType1.filterModel.DistrictId = null; await viewModelType1.LoadOnRefreshCommandAsync(); } LabelDistrict.Text = Language.quan_huyen; LabelDistrict.TextColor = Color.Black; await viewModel.GetDistrictAsync(); viewModel.District = null; loadingPopup.IsVisible = false; }
public async void Province_Change(object sender, LookUpChangeEvent e) { if (viewModel.MoiGioiModel.Province != null) { viewModel.MoiGioiModel.ProvinceId = viewModel.MoiGioiModel.Province.Id; await viewModel.GetDistrictAsync(); } else { viewModel.MoiGioiModel.ProvinceId = null; viewModel.DistrictList.Clear(); } viewModel.MoiGioiModel.District = null; viewModel.MoiGioiModel.DistrictId = null; lookupDistrict.SelectedItem = null; }
public async void District_Change(object sender, LookUpChangeEvent e) { //chon quan/huyen if (viewModel.ContactModel.District != null) { viewModel.ContactModel.DistrictId = viewModel.ContactModel.District.Id; } else { viewModel.ContactModel.DistrictId = null; } loadingPopup.IsVisible = true; await viewModel.GetWardAsync(); viewModel.ContactModel.Ward = null; loadingPopup.IsVisible = false; }
public async void District_change(object sender, LookUpChangeEvent e) { if (viewModel.EmployeeModel.District != null) { viewModel.EmployeeModel.DistrictId = viewModel.EmployeeModel.District.Id; } else { viewModel.EmployeeModel.DistrictId = null; } loadingPopup.IsVisible = true; await viewModel.GetWardAsync(); viewModel.EmployeeModel.Ward = null; loadingPopup.IsVisible = false; }
public async void FilterBank_Changed(object sender, LookUpChangeEvent e) { if (viewModel.Bank.Id == -1) { viewModel.Bank = null; viewModel._filterModel.BankId = null; } else { viewModel._filterModel.BankId = viewModel.Bank.Id; } loadingPopup.IsVisible = true; await viewModel.LoadOnRefreshCommandAsync(); loadingPopup.IsVisible = false; }
public async void Province_Change(object sender, LookUpChangeEvent e) { if (viewModel.LiquidationModel.Province != null) { viewModel.LiquidationModel.ProvinceId = viewModel.LiquidationModel.Province.Id; } else { viewModel.LiquidationModel.ProvinceId = null; } loadingPopup.IsVisible = true; await viewModel.GetDistrictAsync(); viewModel.WardList.Clear(); viewModel.LiquidationModel.District = null; viewModel.LiquidationModel.Ward = null; loadingPopup.IsVisible = false; }
public async void Type_Change(object sender, LookUpChangeEvent e) { loadingPopup.IsVisible = true; if (viewModel.Type.Id == -1) { LabelType.Text = Language.loai_bat_dong_san; LabelType.TextColor = Color.Black; viewModel.Type = null; } else { LabelType.Text = viewModel.Type.Name; LabelType.TextColor = Color.FromHex("#026294"); } if (CurrentIndex == 0) { if (viewModel.Type == null) { viewModelType0.filterModel.LoaiBatDongSanId = null; } else { viewModelType0.filterModel.LoaiBatDongSanId = (short?)viewModel.Type.Id; } await viewModelType0.LoadOnRefreshCommandAsync(); } else { if (viewModel.Type == null) { viewModelType1.filterModel.LoaiBatDongSanId = null; } else { viewModelType1.filterModel.LoaiBatDongSanId = (short?)viewModel.Type.Id; } await viewModelType1.LoadOnRefreshCommandAsync(); } loadingPopup.IsVisible = false; }
public async void Province_Change(object sender, LookUpChangeEvent e) { //chon tinh/thanh if (viewModel.AddCompanyModel.Province != null) { viewModel.AddCompanyModel.ProvinceId = viewModel.AddCompanyModel.Province.Id; } else { viewModel.AddCompanyModel.Province = null; } loadingPopup.IsVisible = true; await viewModel.GetDistrictAsync(); viewModel.WardList.Clear(); viewModel.AddCompanyModel.District = null; viewModel.AddCompanyModel.Ward = null; loadingPopup.IsVisible = false; }
// loai bat dong san change public void LoaiBatDongSan_Change(object sender, LookUpChangeEvent e) { if (viewModel.PostModel.LoaiBatDongSan == null) { return; } var id = viewModel.PostModel.LoaiBatDongSan.Id; viewModel.PostModel.LoaiBatDongSanId = id; switch (id) { case 0: // Căn hộ { viewModel.ShowTang = true; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = true; viewModel.ShowBedroom = true; viewModel.Showutilities = true; break; } case 1: //Căn hộ dịch vụ { viewModel.ShowTang = true; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = true; viewModel.ShowBedroom = true; viewModel.Showutilities = true; break; } case 2: //Nhà riêng { viewModel.ShowTang = false; viewModel.ShowSoTang = true; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = true; viewModel.ShowBedroom = true; viewModel.Showutilities = true; break; } case 3: //Nhà mặt phố, shophouse { viewModel.ShowTang = false; viewModel.ShowSoTang = true; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = true; viewModel.ShowBedroom = true; viewModel.Showutilities = true; break; } case 4: //Nhà biệt thự, liền kề { viewModel.ShowTang = false; viewModel.ShowSoTang = true; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = true; viewModel.ShowBedroom = true; viewModel.Showutilities = true; break; } case 5: //Nhà trọ, phòng trọ { viewModel.ShowTang = true; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = false; viewModel.ShowBedroom = false; viewModel.Showutilities = true; break; } case 6: //Văn phòng { viewModel.ShowTang = true; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = false; viewModel.ShowBedroom = false; viewModel.Showutilities = true; break; } case 7: //Cửa hàng, mặt bằng bán lẻ { viewModel.ShowTang = false; viewModel.ShowSoTang = true; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = true; viewModel.ShowBedroom = true; viewModel.Showutilities = true; break; } case 8: //Đất, nhà xưởng, kho bãi { viewModel.ShowTang = false; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = true; viewModel.ShowBathroom = false; viewModel.ShowBedroom = false; viewModel.Showutilities = false; break; } case 9: //Đất { viewModel.ShowTang = false; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = true; viewModel.ShowBathroom = false; viewModel.ShowBedroom = false; viewModel.Showutilities = false; break; } case 10: //Bất động sản khác { viewModel.ShowTang = false; viewModel.ShowSoTang = false; viewModel.ShowChieuSau = false; viewModel.ShowBathroom = false; viewModel.ShowBedroom = false; viewModel.Showutilities = true; break; } default: break; } }
private async void Province_Change(object sender, LookUpChangeEvent e) { await viewModel.GetDistrictAsync(); }
public void OnDistrict_Change(object sender, LookUpChangeEvent e) { viewModel.Ward = null; }
public async void OnProvice_Change(object sender, LookUpChangeEvent e) { viewModel.District = null; }