Exemplo n.º 1
0
        ///
        /// Clone新的DataSet。
        ///
        public override DataSet Clone()
        {
            DataSetDOCTORINTRODUCTION cln = ((DataSetDOCTORINTRODUCTION)(base.Clone()));

            cln.InitVars();
            return(cln);
        }
Exemplo n.º 2
0
        ///
        /// 得到改变的DataSetDOCTORINTRODUCTION实体。注意:得到的实体里面的Relations(如果存在)已经被删除,也就是说得到的实体表之间时没有任何关联的, 并且得到的数据集呈现无改变状态。
        ///
        public DataSetDOCTORINTRODUCTION GetChangesEntity(DataRowState ds)
        {
            ///////// 2006-02-21
            DataSetDOCTORINTRODUCTION dataSet = (DataSetDOCTORINTRODUCTION)this.GetChanges(ds);

            return(dataSet);

/*	2006=02-21
 *                      DataSetDOCTORINTRODUCTION entity = new DataSetDOCTORINTRODUCTION();
 *                      entity.Relations.Clear();
 *
 *                      DataSet dataSet = this.GetChanges();
 *                      foreach(DataTable dt in dataSet.Tables)
 *                      {
 *                              foreach(DataRow dr in dt.Rows)
 *                              {
 *                                      if(dr.RowState == ds)
 *                                      {
 *                                              if(dr.RowState == DataRowState.Deleted)
 *                                                      dr.RejectChanges();
 *                                              entity.Tables[dt.TableName].Rows.Add(dr.ItemArray);
 *                                              if(ds == DataRowState.Deleted)
 *                                                      dr.Delete();
 *                                      }
 *                              }
 *                      }
 *                      entity.AcceptChanges();
 *                      return entity;
 */

            /*foreach(DataTable dt in this.Tables)
             * {
             *      DataTable changeTable = dt.GetChanges(ds);
             *      if(changeTable != null)
             *      {
             *              entity.Tables.Remove(changeTable.TableName);
             *              entity.Tables.Add(changeTable.Copy());
             *      }
             * }
             * return entity;*/
        }