Esempio n. 1
0
        private Hashtable hashRibbonButtonFunction = new Hashtable();       //danh sach cac ribbon button ma co tag trong function list (chinh la nhung ribbon button can phan quyen)

        #region Event
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            try
            {
                #region Tạm thời bỏ
                //List<Contract_Info> _lst_tem = new List<Contract_Info>();
                //List<Contract_Info> _lst = new List<Contract_Info>();
                //List<Contract_Info> _lst_nopay = new List<Contract_Info>();
                //Contract_Controller _Contract_Controller = new Contract_Controller();
                //_lst_tem = _Contract_Controller.Get_Contract_Exprire_Date(ConvertData.ConvertDate2String(DateTime.Now));
                //foreach (Contract_Info item in _lst_tem)
                //{
                //    if (item.Fee_Status == (decimal)Enum_Fee_Status.Payed)
                //    {
                //        _lst.Add(item);
                //    }
                //    else
                //        _lst_nopay.Add(item);
                //}

                //if (_lst.Count > 0)
                //{
                //    StartsInternational.Contract.Create.Auto_StatusContract _Auto_StatusContract = new Contract.Create.Auto_StatusContract();
                //    _Auto_StatusContract.c_lst = _lst;
                //    _Auto_StatusContract.Owner = Window.GetWindow(this);
                //    _Auto_StatusContract.ShowDialog();
                //}
                #endregion

                Contract_Controller  _Contract_Controller = new Contract_Controller();
                List <Contract_Info> _lst_nopay           = _Contract_Controller.Contract_Search_DenHanTB(ConvertData.ConvertDate2String(DateTime.Now), ConvertData.ConvertDate2String(DateTime.Now.AddDays(60)));

                if (_lst_nopay.Count > 0)
                {
                    Contract_HetHan_Display _Contract_HetHan_Display = new Contract_HetHan_Display();
                    _Contract_HetHan_Display.c_lst = _lst_nopay;
                    _Contract_HetHan_Display.Owner = Window.GetWindow(this);
                    _Contract_HetHan_Display.ShowDialog();
                }
                InitAllDockForm();
            }
            catch (Exception ex)
            {
                ErrorLog.log.Error(ex.ToString());
            }
        }
Esempio n. 2
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());
            }
        }
        void LoadData(bool p_is_call)
        {
            try
            {
                if (p_is_call == false)
                {
                    dgrContract.ItemsSource = c_lst;
                }
                else
                {
                    Contract_Controller _Contract_Controller = new Contract_Controller();
                    c_lst = _Contract_Controller.Contract_Search_DenHanTB(ConvertData.ConvertDate2String(DateTime.Now), ConvertData.ConvertDate2String(DateTime.Now.AddDays(60)));
                }

                DataGridHelper.NVSFocus(dgrContract, 0, 0);
            }
            catch (Exception ex)
            {
                CommonData.log.Error(ex.ToString());
            }
        }