public StateProcessApproval Approval(string id) { StateProcessApproval result; var unitCode = GetCurrentUnitCode(); var periods = CurrentSetting.GetKhoaSo(unitCode); if (periods != null) { var tableName = ProcedureCollection.GetTableName(periods.Year, periods.Period); if (ProcedureCollection.DecreaseVoucher(tableName, periods.Year, periods.Period, id)) { result = StateProcessApproval.Success; } else { result = StateProcessApproval.Failed; } } else { result = StateProcessApproval.NoPeriod; } return(result); }