Пример #1
0
 public List<AbstractAuthors> GetAll()
 {
     AbstractAuthorsDAC _abstractAuthorsComponent = new AbstractAuthorsDAC();
      IDataReader reader =  _abstractAuthorsComponent.GetAllAbstractAuthors().CreateDataReader();
      List<AbstractAuthors> _abstractAuthorsList = new List<AbstractAuthors>();
      while(reader.Read())
      {
      if(_abstractAuthorsList == null)
          _abstractAuthorsList = new List<AbstractAuthors>();
          AbstractAuthors _abstractAuthors = new AbstractAuthors();
          if(reader["AbstractAuthorId"] != DBNull.Value)
              _abstractAuthors.AbstractAuthorId = Convert.ToInt32(reader["AbstractAuthorId"]);
          if(reader["AbstractId"] != DBNull.Value)
              _abstractAuthors.AbstractId = Convert.ToInt32(reader["AbstractId"]);
          if(reader["FirstName"] != DBNull.Value)
              _abstractAuthors.FirstName = Convert.ToString(reader["FirstName"]);
          if(reader["FamilyName"] != DBNull.Value)
              _abstractAuthors.FamilyName = Convert.ToString(reader["FamilyName"]);
          if(reader["Title"] != DBNull.Value)
              _abstractAuthors.Title = Convert.ToString(reader["Title"]);
          if(reader["Degree"] != DBNull.Value)
              _abstractAuthors.Degree = Convert.ToString(reader["Degree"]);
          if(reader["Email"] != DBNull.Value)
              _abstractAuthors.Email = Convert.ToString(reader["Email"]);
          if(reader["Address"] != DBNull.Value)
              _abstractAuthors.Address = Convert.ToString(reader["Address"]);
          if(reader["PhoneNumber"] != DBNull.Value)
              _abstractAuthors.PhoneNumber = Convert.ToString(reader["PhoneNumber"]);
          if(reader["AffilitationDepartment"] != DBNull.Value)
              _abstractAuthors.AffilitationDepartment = Convert.ToString(reader["AffilitationDepartment"]);
          if(reader["AffilitationInstitutionHospital"] != DBNull.Value)
              _abstractAuthors.AffilitationInstitutionHospital = Convert.ToString(reader["AffilitationInstitutionHospital"]);
          if(reader["AffilitationCity"] != DBNull.Value)
              _abstractAuthors.AffilitationCity = Convert.ToString(reader["AffilitationCity"]);
          if(reader["AffilitationCountry"] != DBNull.Value)
              _abstractAuthors.AffilitationCountry = Convert.ToString(reader["AffilitationCountry"]);
          if(reader["Country"] != DBNull.Value)
              _abstractAuthors.Country = Convert.ToString(reader["Country"]);
          if(reader["POBox"] != DBNull.Value)
              _abstractAuthors.POBox = Convert.ToString(reader["POBox"]);
          if(reader["ZipCode"] != DBNull.Value)
              _abstractAuthors.ZipCode = Convert.ToString(reader["ZipCode"]);
          if(reader["City"] != DBNull.Value)
              _abstractAuthors.City = Convert.ToString(reader["City"]);
          if(reader["IsMainAuthor"] != DBNull.Value)
              _abstractAuthors.IsMainAuthor = Convert.ToBoolean(reader["IsMainAuthor"]);
          if(reader["PhoneNumberAreaCode"] != DBNull.Value)
              _abstractAuthors.PhoneNumberAreaCode = Convert.ToString(reader["PhoneNumberAreaCode"]);
      _abstractAuthors.NewRecord = false;
      _abstractAuthorsList.Add(_abstractAuthors);
      }             reader.Close();
      return _abstractAuthorsList;
 }
Пример #2
0
 public void Delete(int Original_AbstractAuthorId)
 {
     AbstractAuthorsDAC abstractauthorsComponent = new AbstractAuthorsDAC();
     abstractauthorsComponent.DeleteAbstractAuthors(Original_AbstractAuthorId);
 }
Пример #3
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     AbstractAuthorsDAC abstractauthorscomponent = new AbstractAuthorsDAC();
     return abstractauthorscomponent.UpdateDataset(dataset);
 }
Пример #4
0
 public bool Update( int AbstractId,  string FirstName,  string FamilyName,  string Title,  string Degree,  string Email,  string Address,  string PhoneNumber,  string AffilitationDepartment,  string AffilitationInstitutionHospital,  string AffilitationCity,  string AffilitationCountry,  string Country,  string POBox,  string ZipCode,  string City,  bool IsMainAuthor,  string PhoneNumberAreaCode,  int Original_AbstractAuthorId)
 {
     AbstractAuthorsDAC abstractauthorsComponent = new AbstractAuthorsDAC();
     return abstractauthorsComponent.UpdateAbstractAuthors( AbstractId,  FirstName,  FamilyName,  Title,  Degree,  Email,  Address,  PhoneNumber,  AffilitationDepartment,  AffilitationInstitutionHospital,  AffilitationCity,  AffilitationCountry,  Country,  POBox,  ZipCode,  City,  IsMainAuthor,  PhoneNumberAreaCode,  Original_AbstractAuthorId);
 }
Пример #5
0
 public bool Update(AbstractAuthors abstractauthors ,int old_abstractAuthorId)
 {
     AbstractAuthorsDAC abstractauthorsComponent = new AbstractAuthorsDAC();
     return abstractauthorsComponent.UpdateAbstractAuthors( abstractauthors.AbstractId,  abstractauthors.FirstName,  abstractauthors.FamilyName,  abstractauthors.Title,  abstractauthors.Degree,  abstractauthors.Email,  abstractauthors.Address,  abstractauthors.PhoneNumber,  abstractauthors.AffilitationDepartment,  abstractauthors.AffilitationInstitutionHospital,  abstractauthors.AffilitationCity,  abstractauthors.AffilitationCountry,  abstractauthors.Country,  abstractauthors.POBox,  abstractauthors.ZipCode,  abstractauthors.City,  abstractauthors.IsMainAuthor,  abstractauthors.PhoneNumberAreaCode,  old_abstractAuthorId);
 }
Пример #6
0
 public bool Insert(AbstractAuthors abstractauthors)
 {
     int autonumber = 0;
     AbstractAuthorsDAC abstractauthorsComponent = new AbstractAuthorsDAC();
     bool endedSuccessfuly = abstractauthorsComponent.InsertNewAbstractAuthors( ref autonumber,  abstractauthors.AbstractId,  abstractauthors.FirstName,  abstractauthors.FamilyName,  abstractauthors.Title,  abstractauthors.Degree,  abstractauthors.Email,  abstractauthors.Address,  abstractauthors.PhoneNumber,  abstractauthors.AffilitationDepartment,  abstractauthors.AffilitationInstitutionHospital,  abstractauthors.AffilitationCity,  abstractauthors.AffilitationCountry,  abstractauthors.Country,  abstractauthors.POBox,  abstractauthors.ZipCode,  abstractauthors.City,  abstractauthors.IsMainAuthor,  abstractauthors.PhoneNumberAreaCode);
     if(endedSuccessfuly)
     {
         abstractauthors.AbstractAuthorId = autonumber;
     }
     return endedSuccessfuly;
 }