日期:2014-05-17  浏览次数:20861 次

LIST<t> 添加实体值被覆盖问题
  List<Model.CP_PATIENT_ORDER> list = new List<Model.CP_PATIENT_ORDER>();
                                                List<int> test = new List<int>();
                                                for (int l = 0; l < dsphaselq.Tables[0].Rows.Count; l++)
                                                {
                                                    Model.CP_PATIENT_ORDER model = modelCporder;                                                 
                                                    model.PHASE_ID = dsphaselq.Tables[0].Rows[l]["PHASE_ID"].ToString();
                                                    model.ORDER_ID = GetNewObject.GetNewID(8);
                                                   
                                                    list.Add(model);//此处添加的值被覆盖