Ejemplo n.º 1
0
 void LoadData()
 {
     try
     {
         c_lst = c_BuildingController.Building_GetAll();
         dgrRenter.ItemsSource = c_lst;
         DataGridHelper.NVSFocus(dgrRenter, 0, 0);
     }
     catch (Exception ex)
     {
         CommonData.log.Error(ex.ToString());
     }
 }
Ejemplo n.º 2
0
        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());
            }
        }
Ejemplo n.º 3
0
        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());
            }
        }