/// <summary>
 /// 得到一个对象实体
 /// </summary>
 public HisClient.Model.his_ds_changepriceinfo DataRowToModel(DataRow row)
 {
     HisClient.Model.his_ds_changepriceinfo model=new HisClient.Model.his_ds_changepriceinfo();
     if (row != null)
     {
         if(row["ID"]!=null)
         {
             model.ID=row["ID"].ToString();
         }
         if(row["MEDINFO_CODE"]!=null)
         {
             model.MEDINFO_CODE=row["MEDINFO_CODE"].ToString();
         }
         if(row["MED_NAME"]!=null)
         {
             model.MED_NAME=row["MED_NAME"].ToString();
         }
         if(row["MED_SPC"]!=null)
         {
             model.MED_SPC=row["MED_SPC"].ToString();
         }
         if(row["VALIDITY_DATE"]!=null && row["VALIDITY_DATE"].ToString()!="")
         {
             model.VALIDITY_DATE=DateTime.Parse(row["VALIDITY_DATE"].ToString());
         }
         if(row["MED_PRICE"]!=null && row["MED_PRICE"].ToString()!="")
         {
             model.MED_PRICE=decimal.Parse(row["MED_PRICE"].ToString());
         }
         if(row["PURCHASE_PRICE"]!=null && row["PURCHASE_PRICE"].ToString()!="")
         {
             model.PURCHASE_PRICE=decimal.Parse(row["PURCHASE_PRICE"].ToString());
         }
         if(row["WHOLESALE_PRICE"]!=null && row["WHOLESALE_PRICE"].ToString()!="")
         {
             model.WHOLESALE_PRICE=decimal.Parse(row["WHOLESALE_PRICE"].ToString());
         }
         if(row["CREATE_DATE"]!=null && row["CREATE_DATE"].ToString()!="")
         {
             model.CREATE_DATE=DateTime.Parse(row["CREATE_DATE"].ToString());
         }
         if(row["CREATE_BY"]!=null)
         {
             model.CREATE_BY=row["CREATE_BY"].ToString();
         }
         if(row["PAKAGE_UNIT"]!=null)
         {
             model.PAKAGE_UNIT=row["PAKAGE_UNIT"].ToString();
         }
         if(row["MED_MADETIME"]!=null && row["MED_MADETIME"].ToString()!="")
         {
             model.MED_MADETIME=DateTime.Parse(row["MED_MADETIME"].ToString());
         }
         if(row["BATCHNO"]!=null)
         {
             model.BATCHNO=row["BATCHNO"].ToString();
         }
         if(row["NEW_PRICE"]!=null && row["NEW_PRICE"].ToString()!="")
         {
             model.NEW_PRICE=decimal.Parse(row["NEW_PRICE"].ToString());
         }
         if(row["CHANGE_CODE"]!=null)
         {
             model.CHANGE_CODE=row["CHANGE_CODE"].ToString();
         }
     }
     return model;
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public HisClient.Model.his_ds_changepriceinfo GetModel(string ID)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("select ID,MEDINFO_CODE,MED_NAME,MED_SPC,VALIDITY_DATE,MED_PRICE,PURCHASE_PRICE,WHOLESALE_PRICE,CREATE_DATE,CREATE_BY,PAKAGE_UNIT,MED_MADETIME,BATCHNO,NEW_PRICE,CHANGE_CODE from his_ds_changepriceinfo ");
            strSql.Append(" where ID=@ID ");
            MySqlParameter[] parameters = {
                    new MySqlParameter("@ID", MySqlDbType.VarChar,18)			};
            parameters[0].Value = ID;

            HisClient.Model.his_ds_changepriceinfo model=new HisClient.Model.his_ds_changepriceinfo();
            DataSet ds=DbHelperMySQL.Query(strSql.ToString(),parameters);
            if(ds.Tables[0].Rows.Count>0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }