コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 public void Excute()
 {
     if (!string.IsNullOrEmpty(_LeaveRequestItem.UseList))
     {
         string[] detail = _LeaveRequestItem.UseList.Split('/');
         if (detail != null)
         {
             foreach (string s in detail)
             {
                 string[] use = s.Split(',');
                 if (use != null && use.Length == 2)
                 {
                     int        adjustid   = Convert.ToInt32(use[0]);
                     decimal    deletehour = Convert.ToDecimal(use[1]);
                     AdjustRest adjustrest = _IAdjustRest.GetAdjustRestByPKID(adjustid);
                     if (adjustrest != null)
                     {
                         adjustrest.SurplusHours += deletehour;
                         _IAdjustRest.UpdateAdjustRest(adjustrest);
                     }
                 }
             }
             CreateHistory();
         }
     }
 }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pkid"></param>
        /// <returns></returns>
        public AdjustRest GetAdjustRestByPKID(int pkid)
        {
            AdjustRest retAdjustRest = _IAdjustRestDal.GetAdjustRestByPKID(pkid);

            retAdjustRest.Employee = new Employee(retAdjustRest.Employee.Account.Id, EmployeeTypeEnum.All);
            retAdjustRest.Employee = _GetEmployee.GetEmployeeBasicInfoByAccountID(retAdjustRest.Employee.Account.Id);
            retAdjustRest.AdjustRestHistoryList =
                _GetAdjustRestHistory.GetAdjustRestHistoryByAccountID(retAdjustRest.Employee.Account.Id);
            return(retAdjustRest);
        }
コード例 #3
0
 private void InitAdjustRest()
 {
     _AdjustRest = _IAdjustRest.GetAdjustRestByPKID(_AdjustRestID);
 }