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

            lnRICheckItem item = null;

            try
            {
                item = lnRICheckItem.SingleOrDefault(query);
                if (item != null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
        public RICheckItemModel UpdateCheckItem(RICheckItemModel cplnRICheckItem)
        {
            lnRICheckItem result = null;

            try
            {
                result = Mapper.Map <lnRICheckItem>(cplnRICheckItem);
                result.Update();
            }
            catch (Exception ex)
            {
                LogHelper.Error <lnRICheckItemDataProvider>("Update RICheckitem Failed! \n", ex);
            }
            cplnRICheckItem = Mapper.Map <RICheckItemModel>(result);
            return(cplnRICheckItem);
        }