Esempio n. 1
0
        private LabelRuleMaintainInfo convertToMaintainInfoFromObj(LabelRule temp)
        {
            LabelRuleMaintainInfo labelRule = new LabelRuleMaintainInfo();

            labelRule.RuleID = temp.RuleID;
            labelRule.TemplateName = temp.TemplateName;

            return labelRule;
        }
Esempio n. 2
0
        private LabelRule convertToObjFromMaintainInfo(LabelRule obj, LabelRuleMaintainInfo temp)
        {
            obj.TemplateName = temp.TemplateName;

            return obj;
        }
Esempio n. 3
0
        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;
            }
        }