Beispiel #1
0
        public bool ExistsRecord(string DocID, string id)
        {
            var query = new Sql("select * from [APlatformAppSchema].[lnRIRecord] where DocID=@0 and IsDelete=0 and DocID <> @1",
                                new SqlParameter {
                DbType = DbType.String, Value = DocID
            },
                                new SqlParameter {
                DbType = DbType.String, Value = id
            });

            lnRIRecord record = null;

            try
            {
                record = lnRIRecord.SingleOrDefault(query);
                if (record != null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Beispiel #2
0
        public RIRecordModel AddRecord(RIRecordModel cplnRIRecord)
        {
            RIRecordModel result  = null;
            lnRIRecord    _record = null;

            try
            {
                _record = Mapper.Map <lnRIRecord>(cplnRIRecord);
                var recordId = Convert.ToInt64(_record.Insert());
                result = cplnRIRecord;
            }
            catch (Exception ex)
            {
                LogHelper.Error <lnRIRecordDataProvider>("Add lnRIRecord Failed! \n", ex);
            }
            return(result);
        }
Beispiel #3
0
        public RIRecordModel AddRecord(RIRecordModel _et1, LnRIRecordEntityModel _et2)
        {
            RIRecordModel    result = null;
            lnRIRecord       _r1    = null;
            lnRIRecordEntity _r2    = null;


            _r1 = Mapper.Map <lnRIRecord>(_et1);
            _r2 = Mapper.Map <lnRIRecordEntity>(_et2);

            _r1.Insert();
            _r2.Insert();

            result = _et1;

            return(result);
        }
Beispiel #4
0
        public RIRecordModel UpdateRecord(RIRecordModel cplnRIRecord)
        {
            RIRecordModel result  = null;
            lnRIRecord    _record = null;

            try
            {
                _record = Mapper.Map <lnRIRecord>(cplnRIRecord);
                _record.Update();

                result = Mapper.Map <RIRecordModel>(_record);
            }
            catch (Exception ex)
            {
                LogHelper.Error <lnRIRecordDataProvider>("Update lnRIRecord Failed! \n", ex);
            }
            return(result);
        }