private LabelRuleMaintainInfo convertToMaintainInfoFromObj(LabelRule temp) { LabelRuleMaintainInfo labelRule = new LabelRuleMaintainInfo(); labelRule.RuleID = temp.RuleID; labelRule.TemplateName = temp.TemplateName; return labelRule; }
private LabelRule convertToObjFromMaintainInfo(LabelRule obj, LabelRuleMaintainInfo temp) { obj.TemplateName = temp.TemplateName; return obj; }
public int AddLabelRule(LabelRuleMaintainInfo infoLabelRule) { FisException ex; List<string> paraError = new List<string>(); try { LabelRule labelRuleObj = new LabelRule(); labelRuleObj = convertToObjFromMaintainInfo(labelRuleObj, infoLabelRule); IUnitOfWork work = new UnitOfWork(); labelTypeRepository.AddLabelRuleDefered(work, labelRuleObj); work.Commit(); return labelRuleObj.RuleID; } catch (FisException e) { logger.Error(e.mErrmsg); throw e; } catch (Exception e) { logger.Error(e.Message); throw; } }