public void Init(bool isPostBack)
        {
            if (!isPostBack)
            {
                try
                {
                    _IReimburseView.Message = string.Empty;

                    _IReimburseView.ReimburseCategoriesEnumDataSrc = ReimburseCategoriesEnum.GetAll();

                    reimburse = _IReimburseFacade.GetReimburseByPkid(_ReimburseID);
                    Account account = BllInstance.AccountBllInstance.GetAccountById(reimburse.ApplierID);
                    _IReimburseView.OutCityAllowance          = reimburse.OutCityAllowance.ToString();
                    _IReimburseView.ApplierName               = account.Name;
                    _IReimburseView.Reimburse                 = reimburse;
                    _IReimburseView.ReimburseCategoriesEnumID = reimburse.ReimburseCategoriesEnum.Id.ToString();
                    _IReimburseView.PaperCount                = reimburse.PaperCount.ToString();
                    _IReimburseView.Destinations              = reimburse.Destinations;
                    _IReimburseView.ProjectName               = reimburse.ProjectName;
                    _IReimburseView.ConsumeDateFrom           = reimburse.ConsumeDateFrom.ToString();
                    _IReimburseView.ConsumeDateTo             = reimburse.ConsumeDateTo.ToString();
                    _IReimburseView.DepartmentName            = _LoginUser.Dept.DepartmentName;
                    _IReimburseView.ReimburseItemSource       = reimburse.ReimburseItems;
                    _IReimburseView.OutCityDays               = reimburse.OutCityDays.ToString();
                }
                catch
                {
                    _IReimburseView.Message = "初始化信息失败";
                }
            }
            // 差旅报销
            if (_IReimburseView.ReimburseCategoriesEnumID == "0")
            {
                _IReimburseView.IsTravelReimburse = true;
            }
            // 非差旅报销
            else if (_IReimburseView.ReimburseCategoriesEnumID == "1")
            {
                _IReimburseView.IsTravelReimburse = false;
            }
        }
Пример #2
0
        public void Init(bool isPostBack)
        {
            _IEmployeeReimburseView.IReimburseView.Operation = "报销单详情";
            //_IEmployeeReimburseView.IReimburseView.SetFormReadonly = true;
            _IEmployeeReimburseView.IReimburseView.SetComfirmReadonly = true;
            AttachViewEvent();
            if (!isPostBack)
            {
                try
                {
                    //_IEmployeeReimburseView.IReimburseView.Message = string.Empty;
                    //Employee employee = new Employee();
                    //hrmisModel.Reimburse reimburse = _IReimburseFacade.GetReimburseByPkid(_ReimburseID);
                    //Account account = BllInstance.AccountBllInstance.GetAccountById(reimburse.ApplierID);
                    //employee.Account = new Account();
                    //employee.Account.Name = account.Name;
                    //_IEmployeeReimburseView.IReimburseView.Employee = employee;
                    //_IEmployeeReimburseView.IReimburseView.Reimburse = reimburse;
                    //_IEmployeeReimburseView.IReimburseView.DepartmentName = reimburse.Department.DepartmentName;
                    //_IEmployeeReimburseView.IReimburseView.ReimburseItemSource = reimburse.ReimburseItems;

                    _IEmployeeReimburseView.IReimburseView.Message = string.Empty;

                    _IEmployeeReimburseView.IReimburseView.ReimburseCategoriesEnumDataSrc = ReimburseCategoriesEnum.GetAll();

                    Employee             employee  = new Employee();
                    hrmisModel.Reimburse reimburse = _IReimburseFacade.GetReimburseByPkid(_ReimburseID);
                    Account account = BllInstance.AccountBllInstance.GetAccountById(reimburse.ApplierID);
                    employee.Account      = new Account();
                    employee.Account.Name = account.Name;

                    _IEmployeeReimburseView.IReimburseView.Employee  = employee;
                    _IEmployeeReimburseView.IReimburseView.Reimburse = reimburse;

                    _IEmployeeReimburseView.IReimburseView.ReimburseCategoriesEnumID = reimburse.ReimburseCategoriesEnum.Id.ToString();
                    _IEmployeeReimburseView.IReimburseView.PaperCount   = reimburse.PaperCount.ToString();
                    _IEmployeeReimburseView.IReimburseView.Destinations = reimburse.Destinations;
                    //_IEmployeeReimburseView.IReimburseView.CustomerName = _ICustomerInfoFacade.GetCustomerInfoByID(reimburse.CustomerID);
                    _IEmployeeReimburseView.IReimburseView.ProjectName           = reimburse.ProjectName;
                    _IEmployeeReimburseView.IReimburseView.Discription           = reimburse.Discription;
                    _IEmployeeReimburseView.IReimburseView.ConsumeDateFrom       = reimburse.ConsumeDateFrom.ToShortDateString();
                    _IEmployeeReimburseView.IReimburseView.ConsumeDateFromHour   = reimburse.ConsumeDateFrom.Hour.ToString();
                    _IEmployeeReimburseView.IReimburseView.ConsumeDateFromMinute = reimburse.ConsumeDateFrom.Minute.ToString();
                    _IEmployeeReimburseView.IReimburseView.ConsumeDateTo         = reimburse.ConsumeDateTo.ToShortDateString();
                    _IEmployeeReimburseView.IReimburseView.ConsumeDateToHour     = reimburse.ConsumeDateTo.Hour.ToString();
                    _IEmployeeReimburseView.IReimburseView.ConsumeDateToMinute   = reimburse.ConsumeDateTo.Minute.ToString();
                    _IEmployeeReimburseView.IReimburseView.DepartmentName        = reimburse.Department.DepartmentName;
                    _IEmployeeReimburseView.IReimburseView.ReimburseItemSource   = reimburse.ReimburseItems;
                    _IEmployeeReimburseView.IReimburseView.SetFormReadonly       = true;
                    _IEmployeeReimburseView.IReimburseView.SetDeleteFormButton   = 3;
                    _IEmployeeReimburseView.IReimburseView.ExchangeRateSource    = ExchangeRateLogic.GetExchangeRateDistinctName();
                    _IEmployeeReimburseView.IReimburseView.ExchangeRateID        = reimburse.ExchangeRateID;
                    BindReimburseHistorySource();
                }
                catch
                {
                    _IEmployeeReimburseView.IReimburseView.Message = "初始化信息失败";
                }
            }
            // 差旅报销
            if (_IEmployeeReimburseView.IReimburseView.ReimburseCategoriesEnumID == "0")
            {
                _IEmployeeReimburseView.IReimburseView.IsTravelReimburse = true;
            }
            // 非差旅报销
            else if (_IEmployeeReimburseView.IReimburseView.ReimburseCategoriesEnumID == "1")
            {
                _IEmployeeReimburseView.IReimburseView.IsTravelReimburse = false;
            }
        }
Пример #3
0
        public void Init(bool isPostBack)
        {
            _IReimburseView.Operation       = "报销单详情";
            _IReimburseView.SetFormReadonly = true;
            AttachViewEvent();
            if (!isPostBack)
            {
                try
                {
                    //_IReimburseView.Message = string.Empty;
                    //Employee employee = _IReimburseFacade.GetEmployeeReimburseByEmployeeID(_Loginuser.Id);
                    //Account account = BllInstance.AccountBllInstance.GetAccountById(_Loginuser.Id);
                    //employee.Account.Name = account.Name;
                    //hrmisModel.Reimburse reimburse = employee.FindReimburseByReimburseID(_ReimburseID);

                    //_IReimburseView.Employee = employee;
                    //_IReimburseView.Reimburse = reimburse;
                    //_IReimburseView.DepartmentName = reimburse.Department.DepartmentName;
                    //_IReimburseView.ReimburseItemSource = reimburse.ReimburseItems;
                    //_IReimburseView.SetDeleteFormButton = true;

                    _IReimburseView.Message = string.Empty;

                    _IReimburseView.ReimburseCategoriesEnumDataSrc = ReimburseCategoriesEnum.GetAll();

                    Employee             employee  = new Employee();
                    hrmisModel.Reimburse reimburse = _IReimburseFacade.GetReimburseByPkid(_ReimburseID);
                    Account account = BllInstance.AccountBllInstance.GetAccountById(reimburse.ApplierID);
                    employee.Account      = new Account();
                    employee.Account.Name = account.Name;

                    _IReimburseView.Employee  = employee;
                    _IReimburseView.Reimburse = reimburse;

                    _IReimburseView.ReimburseCategoriesEnumID = reimburse.ReimburseCategoriesEnum.Id.ToString();
                    _IReimburseView.PaperCount   = reimburse.PaperCount.ToString();
                    _IReimburseView.Destinations = reimburse.Destinations;

                    int tempCustomerID;
                    //if(int.TryParse(reimburse.CustomerID,out tempCustomerID))
                    //{
                    //    _IReimburseView.CustomerName = _ICustomerInfoFacade.GetCustomerInfoByID(tempCustomerID).CompanyName;
                    //}
                    _IReimburseView.SetDetailReadonly     = true;
                    _IReimburseView.ProjectName           = reimburse.ProjectName;
                    _IReimburseView.Discription           = reimburse.Discription;
                    _IReimburseView.ConsumeDateFrom       = reimburse.ConsumeDateFrom.ToShortDateString();
                    _IReimburseView.ConsumeDateFromHour   = reimburse.ConsumeDateFrom.Hour.ToString();
                    _IReimburseView.ConsumeDateFromMinute = reimburse.ConsumeDateFrom.Minute.ToString();
                    _IReimburseView.ConsumeDateTo         = reimburse.ConsumeDateTo.ToShortDateString();
                    _IReimburseView.ConsumeDateToHour     = reimburse.ConsumeDateTo.Hour.ToString();
                    _IReimburseView.ConsumeDateToMinute   = reimburse.ConsumeDateTo.Minute.ToString();
                    _IReimburseView.DepartmentName        = reimburse.Department.DepartmentName;
                    _IReimburseView.OutCityAllowance      = reimburse.OutCityAllowance.ToString();
                    _IReimburseView.OutCityDays           = reimburse.OutCityDays.ToString();
                    _IReimburseView.Remark              = reimburse.Remark;
                    _IReimburseView.Discription         = reimburse.Discription;
                    _IReimburseView.ReimburseItemSource = reimburse.ReimburseItems;
                    _IReimburseView.SetDeleteFormButton = 2;
                    _IReimburseView.ExchangeRateSource  = ExchangeRateLogic.GetExchangeRateDistinctName();
                    _IReimburseView.ExchangeRateID      = reimburse.ExchangeRateID;
                    BindReimburseHistorySource();
                }
                catch (Exception ex)
                {
                    _IReimburseView.Message = ex.Message;
                }
            }
            // 差旅报销
            if (_IReimburseView.ReimburseCategoriesEnumID == ReimburseCategoriesEnum.TravelReimburse.Id.ToString())
            {
                _IReimburseView.IsTravelReimburse = true;
            }
            // 非差旅报销
            else if (_IReimburseView.ReimburseCategoriesEnumID == ReimburseCategoriesEnum.UnTravelReimburse.Id.ToString())
            {
                _IReimburseView.IsTravelReimburse = false;
            }
        }