Пример #1
0
 public List<OrganizationLanguages> GetAllByOrganizationId(int OrganizationId)
 {
     OrganizationLanguagesDAC _organizationLanguagesComponent = new OrganizationLanguagesDAC();
     IDataReader reader = _organizationLanguagesComponent.GetAllOrganizationLanguages("OrganizationId = " + OrganizationId).CreateDataReader();
     List<OrganizationLanguages> _organizationLanguagesList = new List<OrganizationLanguages>();
     while (reader.Read())
     {
         if (_organizationLanguagesList == null)
             _organizationLanguagesList = new List<OrganizationLanguages>();
         OrganizationLanguages _organizationLanguages = new OrganizationLanguages();
         if (reader["OrganizationLanguagesId"] != DBNull.Value)
             _organizationLanguages.OrganizationLanguagesId = Convert.ToInt32(reader["OrganizationLanguagesId"]);
         if (reader["OrganizationId"] != DBNull.Value)
             _organizationLanguages.OrganizationId = Convert.ToInt32(reader["OrganizationId"]);
         if (reader["LanguageId"] != DBNull.Value)
             _organizationLanguages.LanguageId = Convert.ToInt32(reader["LanguageId"]);
         if (reader["OrganizationName"] != DBNull.Value)
             _organizationLanguages.OrganizationName = Convert.ToString(reader["OrganizationName"]);
         if (reader["OrganizationDescription"] != DBNull.Value)
             _organizationLanguages.OrganizationDescription = Convert.ToString(reader["OrganizationDescription"]);
         if (reader["AddressLine1"] != DBNull.Value)
             _organizationLanguages.AddressLine1 = Convert.ToString(reader["AddressLine1"]);
         if (reader["AddressLine2"] != DBNull.Value)
             _organizationLanguages.AddressLine2 = Convert.ToString(reader["AddressLine2"]);
         _organizationLanguages.NewRecord = false;
         _organizationLanguagesList.Add(_organizationLanguages);
     } reader.Close();
     return _organizationLanguagesList;
 }
Пример #2
0
 public OrganizationLanguages GetByID(int _organizationLanguagesId)
 {
     OrganizationLanguagesDAC _organizationLanguagesComponent = new OrganizationLanguagesDAC();
      IDataReader reader = _organizationLanguagesComponent.GetByIDOrganizationLanguages(_organizationLanguagesId);
      OrganizationLanguages _organizationLanguages = null;
      while(reader.Read())
      {
          _organizationLanguages = new OrganizationLanguages();
          if(reader["OrganizationLanguagesId"] != DBNull.Value)
              _organizationLanguages.OrganizationLanguagesId = Convert.ToInt32(reader["OrganizationLanguagesId"]);
          if(reader["OrganizationId"] != DBNull.Value)
              _organizationLanguages.OrganizationId = Convert.ToInt32(reader["OrganizationId"]);
          if(reader["LanguageId"] != DBNull.Value)
              _organizationLanguages.LanguageId = Convert.ToInt32(reader["LanguageId"]);
          if(reader["OrganizationName"] != DBNull.Value)
              _organizationLanguages.OrganizationName = Convert.ToString(reader["OrganizationName"]);
          if(reader["OrganizationDescription"] != DBNull.Value)
              _organizationLanguages.OrganizationDescription = Convert.ToString(reader["OrganizationDescription"]);
          if(reader["AddressLine1"] != DBNull.Value)
              _organizationLanguages.AddressLine1 = Convert.ToString(reader["AddressLine1"]);
          if(reader["AddressLine2"] != DBNull.Value)
              _organizationLanguages.AddressLine2 = Convert.ToString(reader["AddressLine2"]);
      _organizationLanguages.NewRecord = false;             }             reader.Close();
      return _organizationLanguages;
 }
Пример #3
0
 public bool Update(OrganizationLanguages organizationlanguages ,int old_organizationLanguagesId)
 {
     OrganizationLanguagesDAC organizationlanguagesComponent = new OrganizationLanguagesDAC();
     return organizationlanguagesComponent.UpdateOrganizationLanguages( organizationlanguages.OrganizationId,  organizationlanguages.LanguageId,  organizationlanguages.OrganizationName,  organizationlanguages.OrganizationDescription,  organizationlanguages.AddressLine1,  organizationlanguages.AddressLine2,  old_organizationLanguagesId);
 }
Пример #4
0
 public bool Insert(OrganizationLanguages organizationlanguages)
 {
     int autonumber = 0;
     OrganizationLanguagesDAC organizationlanguagesComponent = new OrganizationLanguagesDAC();
     bool endedSuccessfuly = organizationlanguagesComponent.InsertNewOrganizationLanguages( ref autonumber,  organizationlanguages.OrganizationId,  organizationlanguages.LanguageId,  organizationlanguages.OrganizationName,  organizationlanguages.OrganizationDescription,  organizationlanguages.AddressLine1,  organizationlanguages.AddressLine2);
     if(endedSuccessfuly)
     {
         organizationlanguages.OrganizationLanguagesId = autonumber;
     }
     return endedSuccessfuly;
 }