public override string GetLeftLeaveMessage() { Annual annual = new Annual(mContext, mLeaver, 0); double annualLeaveDays = annual.getAlreadyLeaveDays(); double carryDays = annual.getLastYearCarryOverDays(); double leaveDays = getAlreadyLeaveDays(); string leaveName = getLeaveName(); double leftDays = 0; string msg = ""; if (IsKaiMan()) { leftDays = mOnceAllowDays + carryDays - leaveDays - annualLeaveDays; msg = string.Format("{0}, 目前剩余可请{1}天(含去年结转{2}天),已请{3}天,年休假已清{4}天,本年总可请(含结转){5}天,目前释放(含结转){6}天。\n", leaveName, leftDays, carryDays, leaveDays, annualLeaveDays, mYearAllowDays + carryDays, mOnceAllowDays + carryDays); } else { leftDays = mOnceAllowDays - leaveDays - annualLeaveDays; msg = string.Format("{0}, 目前剩余可请{1}天,已请{2}天,年休假已清{3}天,本年总可请{4}天。\n", leaveName, leftDays, leaveDays, annualLeaveDays, mYearAllowDays); } return(msg); }
public override ReportData GetReportData() { Annual annual = new Annual(mContext, mLeaver, 0); double annualLeaveDays = annual.getAlreadyLeaveDays(); double carryDays = annual.getLastYearCarryOverDays(); double leaveDays = getAlreadyLeaveDays(); return(new ReportData { Year = 0, LeaveType = (int)mLeaveType, Name = mLeaver, AllowDays = mYearAllowDays, LastYearLeft = carryDays, CurrDays = mOnceAllowDays, LeftDays = leaveDays + annualLeaveDays, SurplusDays = mYearAllowDays + carryDays - leaveDays - annualLeaveDays, }); }