| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Data; |
| | | using System.Data.Entity; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | his.RULE_ID = rule.ID; |
| | | his.GEN_CODE = string.Concat(rule.Details.OrderBy(q => q.RULE_SEQ).Select(q => q.CodeValue)); |
| | | his.GEN_DATE = DateTime.Now; |
| | | Biz.Db.Insertable(his).ExecuteCommand(); |
| | | try |
| | | { |
| | | Biz.Db.Insertable(his).ExecuteCommand(); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | throw new DataException(his.GEN_CODE, ex); |
| | | } |
| | | result.Data = his.GEN_CODE; |
| | | } |
| | | } |
| | | catch (DataException ex) |
| | | { |
| | | result.CatchExceptionWithLog(ex.InnerException, Biz.L("BAS.CodeRule.GenerateSnHisException", ruleCode, ex.Message)); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | result.CatchExceptionWithLog(ex, Biz.L("BAS.CodeRule.GenerateException", ruleCode, string.Join(", ", args))); |