Exemplo n.º 1
0
        public static void LoadFeeRender()
        {
            try
            {
                #region Fee
                lock (c_hs_Fee_Render_byContract.SyncRoot)
                {
                    Fees_Revenue_Controller _Fees_Revenue_Controller = new Fees_Revenue_Controller();
                    c_hs_Fee_Render_byContract.Clear();

                    List <Fees_Revenue_Info> _lst_al = _Fees_Revenue_Controller.Fees_Revenue_GetByObjectType((decimal)Enum_Contract_Type.Renter);

                    if (_lst_al.Count > 0)
                    {
                        foreach (Fees_Revenue_Info item in _lst_al)
                        {
                            if (c_hs_Fee_Render_byContract.ContainsKey(item.Contract_Id) == false)
                            {
                                List <Fees_Revenue_Info> _lst = new List <Fees_Revenue_Info>();
                                _lst.Add(item);
                                c_hs_Fee_Render_byContract[item.Contract_Id] = _lst;
                            }
                            else
                            {
                                List <Fees_Revenue_Info> _lst = (List <Fees_Revenue_Info>)c_hs_Fee_Render_byContract[item.Contract_Id];
                                _lst.Add(item);
                            }
                        }
                    }
                }
                #endregion

                #region Hợp đồng

                Contract_Controller c_Contract_Controller = new Contract_Controller();
                c_lst_contract_renter = c_Contract_Controller.Contract_GetBy_Type((decimal)Enum_Contract_Type.Renter);
                #endregion
            }
            catch (Exception ex)
            {
                ErrorLog.log.Error(ex.ToString());
            }
        }
Exemplo 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_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());
            }
        }