我采用的是三层架构:详细情况如下
表示层:  
  C# code
   private void AddRecordButton_Click(object sender, EventArgs e)
   {
      this.happen();
       DataLinq.员工信息表 obj = new DataLinq.员工信息表();
                    obj.员工编号 = eid;
                    obj.姓名 = ename;
                    obj.性别 = esex;
                    obj.出生年月 = ebirthday;
                    obj.身份证号码 = ecard;
                    obj.电话 = etel;
                    obj.联系地址 = eaddress;
                    obj.部门编号 = sid;
                    obj.职位编号 = pid;
                    obj.薪水 = (decimal)ewage;
                    obj.入职时间 = entertime;
                    obj.员工状态 = state;
                    obj.简历 = resume;
                    obj.备注 = remarks;
                    obj.照片 = imageBytes;
                    //更新数据库中表记录
                    flat = objEmployee.UpdateRecord(obj); //这里最终调用数据访问层的 UpdateRecord(员工信息表                                                                                                            localTable)方法
                     //修改成功与否判定
                    if (flat)
                    {
                        MessageBox.Show("添加成功!");
                    }
                    else
                    {
                        MessageBox.Show("添加失败!");
                    }

   }
    

  数据访问层:
  C# code
    class
  {  
       private DataLinqDataContext myDataContext = new DataLinqDataContext();
      //添加UpdateRecord方法,更新记录
        public bool UpdateRecord(员工信息表 localTable)
        {
            try
            {
                //附加外部实体到DataContext中
                myDataContext.员工信息表.Attach(localTable);
                //更新上下文数据
                myDataContext.Refresh(RefreshMode.KeepCurrentValues, localTable);
                //提交更新
                myDataContext.SubmitChanges(ConflictMode.ContinueOnConflict);
               
                return true;
            }
            catch 
            {
                return false;
            }
        }
}
   


可是在myDataContext.Refresh(RefreshMode.KeepCurrentValues, localTable);调试中出现 "无法刷新指定的对象。对象不再存在于数据库中“

  求大虾来看看!!!!!!!!!