Ejemplo n.º 1
0
        private PCodeLabelTypeMaintainInfo convertToMaintainInfoFromObj(PCodeLabelType temp)
        {
            PCodeLabelTypeMaintainInfo pCodeLabelType = new PCodeLabelTypeMaintainInfo();

            pCodeLabelType.LabelType = temp.LabelType;
            pCodeLabelType.PCode = temp.PCode;

            return pCodeLabelType;
        }
Ejemplo n.º 2
0
        private PCodeLabelType convertToObjFromMaintainInfo(PCodeLabelType obj, PCodeLabelTypeMaintainInfo temp)
        {
            obj.LabelType = temp.LabelType;
            obj.PCode = temp.PCode;

            return obj;
        }
Ejemplo n.º 3
0
        public void SavePCode(IList<string> arrCheckedPCode, PCodeLabelTypeMaintainInfo PCodeLabelTypeInfo)
        {
            try
            {

                IUnitOfWork work = new UnitOfWork();
                labelTypeRepository.DeletePCodeByLabelTypeDefered(work, PCodeLabelTypeInfo.LabelType);

                for (int i = 0; i < arrCheckedPCode.Count(); i++)
                {
                    PCodeLabelType pCodeLabelTypeObj = new PCodeLabelType();


                    pCodeLabelTypeObj = convertToObjFromMaintainInfo(pCodeLabelTypeObj, PCodeLabelTypeInfo);

                    pCodeLabelTypeObj.PCode = arrCheckedPCode[i];

                    labelTypeRepository.SavePCodeDefered(work, pCodeLabelTypeObj);

                }

                work.Commit();

            }
            catch (FisException e)
            {
                logger.Error(e.mErrmsg);
                throw e;
            }
            catch (Exception e)
            {
                logger.Error(e.Message);
                throw;
            }
        }