Beispiel #1
0
 public bool Insert(SiteCategory sitecategory)
 {
     int autonumber = 0;
     SiteCategoryDAC sitecategoryComponent = new SiteCategoryDAC();
     bool endedSuccessfuly = sitecategoryComponent.InsertNewSiteCategory( ref autonumber,  sitecategory.Name,  sitecategory.RowGuid,  sitecategory.ModifiedDate);
     if(endedSuccessfuly)
     {
         sitecategory.SiteCategoryId = autonumber;
     }
     return endedSuccessfuly;
 }
Beispiel #2
0
 public SiteCategory GetByID(int _siteCategoryId)
 {
     SiteCategoryDAC _siteCategoryComponent = new SiteCategoryDAC();
      IDataReader reader = _siteCategoryComponent.GetByIDSiteCategory(_siteCategoryId);
      SiteCategory _siteCategory = null;
      while(reader.Read())
      {
          _siteCategory = new SiteCategory();
          if(reader["SiteCategoryId"] != DBNull.Value)
              _siteCategory.SiteCategoryId = Convert.ToInt32(reader["SiteCategoryId"]);
          if(reader["Name"] != DBNull.Value)
              _siteCategory.Name = Convert.ToString(reader["Name"]);
          if(reader["RowGuid"] != DBNull.Value)
              _siteCategory.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _siteCategory.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _siteCategory.NewRecord = false;             }             reader.Close();
      return _siteCategory;
 }
Beispiel #3
0
 public List<SiteCategory> GetAll()
 {
     SiteCategoryDAC _siteCategoryComponent = new SiteCategoryDAC();
      IDataReader reader =  _siteCategoryComponent.GetAllSiteCategory().CreateDataReader();
      List<SiteCategory> _siteCategoryList = new List<SiteCategory>();
      while(reader.Read())
      {
      if(_siteCategoryList == null)
          _siteCategoryList = new List<SiteCategory>();
          SiteCategory _siteCategory = new SiteCategory();
          if(reader["SiteCategoryId"] != DBNull.Value)
              _siteCategory.SiteCategoryId = Convert.ToInt32(reader["SiteCategoryId"]);
          if(reader["Name"] != DBNull.Value)
              _siteCategory.Name = Convert.ToString(reader["Name"]);
          if(reader["RowGuid"] != DBNull.Value)
              _siteCategory.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _siteCategory.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _siteCategory.NewRecord = false;
      _siteCategoryList.Add(_siteCategory);
      }             reader.Close();
      return _siteCategoryList;
 }
Beispiel #4
0
        public bool Insert( string Name,  Guid RowGuid,  DateTime ModifiedDate)
        {
            SiteCategoryDAC sitecategoryComponent = new SiteCategoryDAC();
            int SiteCategoryId = 0;

            return sitecategoryComponent.InsertNewSiteCategory( ref SiteCategoryId,  Name,  Guid.NewGuid(),  DateTime.Now);
        }
Beispiel #5
0
 public bool Insert( ref int SiteCategoryId,  string Name,  Guid RowGuid,  DateTime ModifiedDate)
 {
     SiteCategoryDAC sitecategoryComponent = new SiteCategoryDAC();
     return sitecategoryComponent.InsertNewSiteCategory( ref SiteCategoryId,  Name,  RowGuid,  ModifiedDate);
 }
Beispiel #6
0
 public void Delete(int Original_SiteCategoryId)
 {
     SiteCategoryDAC sitecategoryComponent = new SiteCategoryDAC();
     sitecategoryComponent.DeleteSiteCategory(Original_SiteCategoryId);
 }
Beispiel #7
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     SiteCategoryDAC sitecategorycomponent = new SiteCategoryDAC();
     return sitecategorycomponent.UpdateDataset(dataset);
 }
Beispiel #8
0
 public bool Update( string Name,  Guid RowGuid,  DateTime ModifiedDate,  int Original_SiteCategoryId)
 {
     SiteCategoryDAC sitecategoryComponent = new SiteCategoryDAC();
     return sitecategoryComponent.UpdateSiteCategory( Name,  RowGuid,  DateTime.Now,  Original_SiteCategoryId);
 }
Beispiel #9
0
 public bool Update(SiteCategory sitecategory ,int old_siteCategoryId)
 {
     SiteCategoryDAC sitecategoryComponent = new SiteCategoryDAC();
     return sitecategoryComponent.UpdateSiteCategory( sitecategory.Name,  sitecategory.RowGuid,  sitecategory.ModifiedDate,  old_siteCategoryId);
 }