Exemplo n.º 1
0
 private void BindEmployeeSetByEmployeeID(int employeeID)
 {
     try
     {
         _ItsView.ResultMessage = string.Empty;
         EmployeeSalary employeeSalary;
         EmployeeSalary temp = _IEmployeeAccountSetFacade.GetEmployeeAccountSetByEmployeeID(employeeID);
         if (temp != null)
         {
             employeeSalary       = temp;
             _ItsView.Description = employeeSalary.AccountSet.Description;
         }
         else
         {
             employeeSalary            = new EmployeeSalary(employeeID);
             employeeSalary.AccountSet = _IAccountSetFacade.GetWholeAccountSetByPKID(_ItsView.AccountSetID);
         }
         employeeSalary.Employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(employeeID);
         _ItsView.EmployeeSalary = employeeSalary;
     }
     catch (Exception ex)
     {
         _ItsView.ResultMessage = "<span class='fontred'>" + ex.Message + "</span>";
     }
 }
        public void InitView(string employeeId)
        {
            _View.ButtonEnable       = false;
            _View.setGirdViewConlumn = true;
            if (!int.TryParse(employeeId, out _EmployeeeId))
            {
                _View.ResultMessage = "初始错误";
                return;
            }
            Employee        employee         = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(_EmployeeeId);
            List <Contract> employeeContract = _IEmployeeContractFacade.GetEmployeeContractByAccountID(_EmployeeeId);

            _View.EmployeeContract = employeeContract;
            _View.ResultMessage    = "<span class='font14b'>你有 </span>"
                                     + "<span class='fontred'>" + employeeContract.Count + "</span>"
                                     + "<span class='font14b'> 条合同信息</span>"; employeeContract.Count.ToString();
            if (employeeContract.Count == 0)
            {
                _View.EmployeeName = string.Empty;
            }
            else
            {
                _View.EmployeeName = "员工姓名: " + employee.Account.Name;
            }
        }
Exemplo n.º 3
0
 public void InitView(string ContractId, bool isPostBack)
 {
     _View.ResultMessage = string.Empty;
     _View.SetReadonly   = true;
     if (!int.TryParse(ContractId, out _ContractId))
     {
         _View.ResultMessage = "初始错误";
         return;
     }
     if (!isPostBack)
     {
         _View.ContractTypeSource = _IContractTypeFacade.GetContractTypeByCondition(-1, string.Empty);
         Contract conta = _IEmployeeContractFacade.GetEmployeeContractByContractId(_ContractId);
         if (conta == null)
         {
             _View.ResultMessage = "<span class='fontred'>当前合同已不存在</span>";
             return;
         }
         _View.ContractStartTime = conta.StartDate.ToShortDateString();
         _View.ContractEndTime   = conta.EndDate.ToShortDateString();
         _View.ContractTypeId    = conta.ContractType.ContractTypeID.ToString();
         _View.Attachment        = conta.Attachment;
         _View.Remark            = conta.Remark;
         _View.ConditionSource   = _IApplyAssessConditionFacade.GetApplyAssessConditionByEmployeeContractID(_ContractId);
         Employee employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(conta.EmployeeID);
         _View.Title = employee.Account.Name + "的合同详细信息";
     }
     InitEmployeeContractTypeList();
 }
 /// <summary>
 /// 初始界面查询所有的员工信息
 /// </summary>
 public void InitPresenter(int employeeID)
 {
     try
     {
         _View.ResultMessage = string.Empty;
         Employee employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(employeeID);
         if (employee != null)
         {
             _View.EmployeeName = employee.Account.Name;
         }
         List <EmployeeSalaryHistory> employeeSalaryHistoryList = new List <EmployeeSalaryHistory>();
         List <EmployeeSalaryHistory> temp = _IEmployeeAccountSetFacade.GetEmployeeSalaryHistoryByEmployeeId(employeeID);
         foreach (EmployeeSalaryHistory history in temp)
         {
             if (history.EmployeeSalaryStatus == EmployeeSalaryStatusEnum.AccountClosed)
             {
                 employeeSalaryHistoryList.Add(history);
             }
         }
         _View.EmployeeSalaryHistoryList = employeeSalaryHistoryList;
         _View.ResultMessage             = "<span class='font14b'>共查到 </span>"
                                           + "<span class='fontred'>" + employeeSalaryHistoryList.Count + "</span>"
                                           + "<span class='font14b'> 条信息</span>";
     }
     catch (Exception ex)
     {
         _View.ResultMessage = "<span class='fontred'>" + ex.Message + "</span>";
     }
 }
 public void InitView(bool isPostBack, int adjustHistoryID)
 {
     _ItsView.AdjustHistoryID = adjustHistoryID.ToString();
     try
     {
         _ItsView.ResultMessage = string.Empty;
         EmployeeSalary employeeSalary = _IEmployeeAccountSetFacade.GetAdjustSalaryHistoryByPKID(adjustHistoryID);
         employeeSalary.Employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(employeeSalary.Employee.Account.Id);
         _ItsView.EmployeeSalary = employeeSalary;
     }
     catch (Exception ex)
     {
         _ItsView.ResultMessage = "<span class='fontred'>" + ex.Message + "</span>";
     }
 }
 public void InitView(bool isPostBack, int employeeID)
 {
     _ItsView.EmployeeID = employeeID.ToString();
     try
     {
         _ItsView.ResultMessage = string.Empty;
         EmployeeSalary employeeSalary = new EmployeeSalary(employeeID);
         EmployeeSalary temp           = _IEmployeeAccountSetFacade.GetEmployeeAccountSetByEmployeeID(employeeID);
         if (temp != null)
         {
             employeeSalary = temp;
         }
         employeeSalary.Employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(employeeID);
         _ItsView.EmployeeSalary = employeeSalary;
     }
     catch (Exception ex)
     {
         _ItsView.ResultMessage = "<span class='fontred'>" + ex.Message + "</span>";
     }
 }
Exemplo n.º 7
0
 public void InitView(string employeeId, bool isPostBack)
 {
     _View.ResultMessage = string.Empty;
     if (!int.TryParse(employeeId, out _EmployeeId))
     {
         _View.ResultMessage = "初始错误";
         return;
     }
     _View.EmployeeId = _EmployeeId.ToString();
     if (!isPostBack)
     {
         _View.Attachment         = string.Empty;
         _View.Remark             = string.Empty;
         _View.ContractTypeSource = _IContractTypeFacade.GetContractTypeByCondition(-1, string.Empty);
         _View.ConditionSource    = new List <ApplyAssessCondition>();
         Employee employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(_EmployeeId);
         _View.Title = "新增" + employee.Account.Name + "的合同";
     }
     InitEmployeeContractTypeList();
 }
Exemplo n.º 8
0
 /// <summary>
 /// 初始界面查询所有的员工信息
 /// </summary>
 public void InitPresenter(int employeeID)
 {
     try
     {
         _View.ResultMessage = string.Empty;
         Employee employee = _IEmployeeFacade.GetEmployeeBasicInfoByAccountID(employeeID);
         if (employee != null)
         {
             _View.EmployeeName = employee.Account.Name;
         }
         _AdjustSalaryHistoryList      = _IEmployeeAccountSetFacade.GetAdjustSalaryHistoryByEmployeeID(employeeID);
         _View.AdjustSalaryHistoryList = _AdjustSalaryHistoryList;
         _View.ResultMessage           = "<span class='font14b'>共查到 </span>"
                                         + "<span class='fontred'>" + _AdjustSalaryHistoryList.Count + "</span>"
                                         + "<span class='font14b'> 条信息</span>";
     }
     catch (Exception ex)
     {
         _View.ResultMessage = "<span class='fontred'>" + ex.Message + "</span>";
     }
 }