private void frmChose_Estate_Object_Loaded(object sender, RoutedEventArgs e) { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; List <AllCode_Info> _lst_c_Status = DBMemory.AllCode_GetBy_CdNameCdType("ESTATE", "STATUS"); _lst_c_Status.Insert(0, _AllCode_Info); cboStatus.ItemsSource = _lst_c_Status; cboStatus.DisplayMemberPath = "Content"; cboStatus.SelectedValuePath = "CdValue"; cboStatus.SelectedIndex = 0; List <AllCode_Info> _lst_c_type = DBMemory.AllCode_GetBy_CdNameCdType("ESTATE", "TYPE"); _lst_c_type.Insert(0, _AllCode_Info); cboType.ItemsSource = _lst_c_type; cboType.DisplayMemberPath = "Content"; cboType.SelectedValuePath = "CdValue"; cboType.SelectedIndex = 0; //c_lst = c_Estate_Object_Controller.Estate_Object_GetAll(); //dgrEstate.ItemsSource = c_lst; //DataGridHelper.NVSFocus(dgrEstate, 0, 0); } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
private void cboCurrency_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { AllCode_Info _AllCode_Info = (AllCode_Info)cboCurrency.SelectedItem; if (_AllCode_Info == null) { return; } if (_AllCode_Info.CdValue == ((decimal)Enum_Contract_Currency.USD).ToString()) { lblThanhTien.Visibility = Visibility.Visible; txtFee_Vnd.Visibility = Visibility.Visible; lblVND.Visibility = Visibility.Visible; } else { lblThanhTien.Visibility = Visibility.Collapsed; txtFee_Vnd.Visibility = Visibility.Collapsed; lblVND.Visibility = Visibility.Collapsed; } } catch (Exception ex) { ErrorLog.log.Error(ex.ToString()); } }
void LoadCombobox() { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; List <AllCode_Info> _lst_c_Status = DBMemory.AllCode_GetBy_CdNameCdType("ESTATE", "STATUS"); _lst_c_Status.Insert(0, _AllCode_Info); cboStatus.ItemsSource = _lst_c_Status; cboStatus.DisplayMemberPath = "Content"; cboStatus.SelectedValuePath = "CdValue"; cboStatus.SelectedIndex = 0; List <AllCode_Info> _lst_c_type = DBMemory.AllCode_GetBy_CdNameCdType("ESTATE", "TYPE"); _lst_c_type.Insert(0, _AllCode_Info); cboType.ItemsSource = _lst_c_type; cboType.DisplayMemberPath = "Content"; cboType.SelectedValuePath = "CdValue"; cboType.SelectedIndex = 0; } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
void LoadCombobox() { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; AllCode_Info _AllCode_Info1 = new AllCode_Info(); _AllCode_Info1.Content = "HĐ sắp hết hạn (thông báo)"; _AllCode_Info1.CdValue = ((decimal)Enum_Contract_Status.Den_Han_Thong_Bao).ToString(); List <AllCode_Info> _lst_c_Status = DBMemory.AllCode_GetBy_CdNameCdType("CONTRACT", "STATUS"); _lst_c_Status.Insert(0, _AllCode_Info); _lst_c_Status.Add(_AllCode_Info1); cboStatus.ItemsSource = _lst_c_Status; cboStatus.DisplayMemberPath = "Content"; cboStatus.SelectedValuePath = "CdValue"; cboStatus.SelectedIndex = 0; } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
void LoadCombobox() { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; List <AllCode_Info> _lst_PayStatus = DBMemory.AllCode_GetBy_CdNameCdType("FEE", "STATUS"); _lst_PayStatus.Insert(0, _AllCode_Info); cboStatusPay.ItemsSource = _lst_PayStatus; cboStatusPay.DisplayMemberPath = "Content"; cboStatusPay.SelectedValuePath = "CdValue"; cboStatusPay.SelectedIndex = 0; List <AllCode_Info> _lst_c_Status = DBMemory.AllCode_GetBy_CdNameCdType("CONTRACT", "STATUS"); _lst_c_Status.Insert(0, _AllCode_Info); cboStatus.ItemsSource = _lst_c_Status; cboStatus.DisplayMemberPath = "Content"; cboStatus.SelectedValuePath = "CdValue"; cboStatus.SelectedIndex = 0; Building_Info _Building_Info_All = new Building_Info(); _Building_Info_All.Building_Id = -1; _Building_Info_All.Building_Name = CommonData.c_All_Content; BuildingController _BuildingController = new BuildingController(); List <Building_Info> _lst_B = _BuildingController.Building_GetAll(); _lst_B.Insert(0, _Building_Info_All); cboBuilding.ItemsSource = _lst_B; cboBuilding.DisplayMemberPath = "Building_Name"; cboBuilding.SelectedValuePath = "Building_Id"; cboBuilding.SelectedIndex = 0; //List<Contract_Info> _lst_contract = new List<Contract_Info>(); //_lst_contract = c_Contract_Controller.Contract_GetBy_Type((decimal)Enum_Contract_Type.Renter); } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
void LoadCombobox() { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; List <AllCode_Info> _lst_c_Status = DBMemory.AllCode_GetBy_CdNameCdType("CONTRACT", "STATUS"); _lst_c_Status.Insert(0, _AllCode_Info); cboStatus.ItemsSource = _lst_c_Status; cboStatus.DisplayMemberPath = "Content"; cboStatus.SelectedValuePath = "CdValue"; cboStatus.SelectedIndex = 0; Building_Info _Building_Info_All = new Building_Info(); _Building_Info_All.Building_Id = -1; _Building_Info_All.Building_Name = CommonData.c_All_Content; BuildingController _BuildingController = new BuildingController(); List <Building_Info> _lst_B = _BuildingController.Building_GetAll(); _lst_B.Insert(0, _Building_Info_All); cboBuilding.ItemsSource = _lst_B; cboBuilding.DisplayMemberPath = "Building_Name"; cboBuilding.SelectedValuePath = "Building_Id"; cboBuilding.SelectedIndex = 0; List <Contract_Info> _lst_contract = new List <Contract_Info>(); _lst_contract = c_Contract_Controller.Contract_GetBy_Type((decimal)Enum_Contract_Type.Tenant); //dangtq sửa lại System.Data.DataTable temp = Common.ConvertData.ConvertToDatatable <Contract_Info>(_lst_contract); CommonFunction.NVS_BindTextboxComplete(txtCode, temp, "Contract_Code"); } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }
private void cboStatusContract_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { AllCode_Info _AllCode_Info = (AllCode_Info)cboStatusContract.SelectedItem; if (_AllCode_Info != null && c_is_load_ok) { if (_AllCode_Info.CdValue == ((decimal)Enum_Contract_Status.Gia_Han).ToString()) { // kiểm tra xem có phải trạng thái của nó là hết hạn hợp đồng không if (c_Contract_Info.Status == (decimal)Enum_Contract_Status.Het_Han) { tabExtend.Visibility = Visibility.Visible; } else if (c_Contract_Info.Status != (decimal)Enum_Contract_Status.Gia_Han) { NoteBox.Show("Hợp đồng chưa hết hạn, không thể gia hạn hợp đồng", "", NoteBoxLevel.Error); return; } } else { if (c_Contract_Info.Status == (decimal)Enum_Contract_Status.Gia_Han) { tabExtend.Visibility = Visibility.Visible; } else { tabExtend.Visibility = Visibility.Collapsed; } } } } catch (Exception ex) { ErrorLog.log.Error(ex.ToString()); } }
private void cboTerm_SelectionChanged_1(object sender, SelectionChangedEventArgs e) { try { AllCode_Info _AllCode_Info = (AllCode_Info)cboTerm.SelectedItem; if (_AllCode_Info != null) { if (_AllCode_Info.CdValue != ((decimal)Enum_Fee_Maturity.Option).ToString()) { lblNumberPay.Visibility = Visibility.Collapsed; txtNumberPay.Visibility = Visibility.Collapsed; btnCall.Visibility = Visibility.Collapsed; txtFeeOnePay.IsReadOnly = true; c_is_option_pay = false; Create_DataFee_Maturity(); } else { lblNumberPay.Visibility = Visibility.Visible; txtNumberPay.Visibility = Visibility.Visible; btnCall.Visibility = Visibility.Visible; txtFeeOnePay.IsReadOnly = false; c_is_option_pay = true; c_lst_Fee = new List <Fees_Revenue_Info>(); dgrFee.ItemsSource = c_lst_Fee; } } } catch (Exception ex) { ErrorLog.log.Error(ex.ToString()); } }
void LoadCombobox() { try { AllCode_Info _AllCode_Info = new AllCode_Info(); _AllCode_Info.Content = CommonData.c_All_Content; _AllCode_Info.CdValue = CommonData.c_All_Value; Estate_Object_Controller _Estate_Object_Controller = new Estate_Object_Controller(); List <Estate_Object_Info> _lst_eb = _Estate_Object_Controller.Estate_Object_GetAll(); Estate_Object_Info _Estate_Object_Info = new Estate_Object_Info(); _Estate_Object_Info.Estate_Code = CommonData.c_All_Value; _Estate_Object_Info.Estate_Name = CommonData.c_All_Value; _lst_eb.Insert(0, _Estate_Object_Info); cboEsateCode.ItemsSource = _lst_eb; cboEsateCode.DisplayMemberPath = "Estate_Name"; cboEsateCode.SelectedValuePath = "Estate_Code"; cboEsateCode.SelectedIndex = 0; User_Controller c_User_Controller = new User_Controller(); List <User_Info> _lst_us = c_User_Controller.User_Get_All(); User_Info _User_Info = new User_Info(); _User_Info.User_Name = CommonData.c_All_Value; _User_Info.User_Name = CommonData.c_All_Value; _lst_us.Insert(0, _User_Info); cboCreatedBy.ItemsSource = _lst_us; cboCreatedBy.DisplayMemberPath = "User_Name"; cboCreatedBy.SelectedValuePath = "User_Name"; cboCreatedBy.SelectedIndex = 0; } catch (Exception ex) { CommonData.log.Error(ex.ToString()); } }