Exemplo n.º 1
0
 public bool Insert(ArticleStatus articlestatus)
 {
     int autonumber = 0;
     ArticleStatusDAC articlestatusComponent = new ArticleStatusDAC();
     bool endedSuccessfuly = articlestatusComponent.InsertNewArticleStatus( ref autonumber,  articlestatus.Name,  articlestatus.RowGuid,  articlestatus.ModifiedDate);
     if(endedSuccessfuly)
     {
         articlestatus.ArticleStatusId = autonumber;
     }
     return endedSuccessfuly;
 }
Exemplo n.º 2
0
 public ArticleStatus GetByID(int _articleStatusId)
 {
     ArticleStatusDAC _articleStatusComponent = new ArticleStatusDAC();
      IDataReader reader = _articleStatusComponent.GetByIDArticleStatus(_articleStatusId);
      ArticleStatus _articleStatus = null;
      while(reader.Read())
      {
          _articleStatus = new ArticleStatus();
          if(reader["ArticleStatusId"] != DBNull.Value)
              _articleStatus.ArticleStatusId = Convert.ToInt32(reader["ArticleStatusId"]);
          if(reader["Name"] != DBNull.Value)
              _articleStatus.Name = Convert.ToString(reader["Name"]);
          if(reader["RowGuid"] != DBNull.Value)
              _articleStatus.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _articleStatus.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _articleStatus.NewRecord = false;             }             reader.Close();
      return _articleStatus;
 }
Exemplo n.º 3
0
 public List<ArticleStatus> GetAll()
 {
     ArticleStatusDAC _articleStatusComponent = new ArticleStatusDAC();
      IDataReader reader =  _articleStatusComponent.GetAllArticleStatus().CreateDataReader();
      List<ArticleStatus> _articleStatusList = new List<ArticleStatus>();
      while(reader.Read())
      {
      if(_articleStatusList == null)
          _articleStatusList = new List<ArticleStatus>();
          ArticleStatus _articleStatus = new ArticleStatus();
          if(reader["ArticleStatusId"] != DBNull.Value)
              _articleStatus.ArticleStatusId = Convert.ToInt32(reader["ArticleStatusId"]);
          if(reader["Name"] != DBNull.Value)
              _articleStatus.Name = Convert.ToString(reader["Name"]);
          if(reader["RowGuid"] != DBNull.Value)
              _articleStatus.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _articleStatus.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _articleStatus.NewRecord = false;
      _articleStatusList.Add(_articleStatus);
      }             reader.Close();
      return _articleStatusList;
 }
Exemplo n.º 4
0
        public bool Insert( string Name,  Guid RowGuid,  DateTime ModifiedDate)
        {
            ArticleStatusDAC articlestatusComponent = new ArticleStatusDAC();
            int ArticleStatusId = 0;

            return articlestatusComponent.InsertNewArticleStatus( ref ArticleStatusId,  Name,  RowGuid,  ModifiedDate);
        }
Exemplo n.º 5
0
 public void Delete(int Original_ArticleStatusId)
 {
     ArticleStatusDAC articlestatusComponent = new ArticleStatusDAC();
     articlestatusComponent.DeleteArticleStatus(Original_ArticleStatusId);
 }
Exemplo n.º 6
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     ArticleStatusDAC articlestatuscomponent = new ArticleStatusDAC();
     return articlestatuscomponent.UpdateDataset(dataset);
 }
Exemplo n.º 7
0
 public bool Update( string Name,  Guid RowGuid,  DateTime ModifiedDate,  int Original_ArticleStatusId)
 {
     ArticleStatusDAC articlestatusComponent = new ArticleStatusDAC();
     return articlestatusComponent.UpdateArticleStatus( Name,  RowGuid,  ModifiedDate,  Original_ArticleStatusId);
 }
Exemplo n.º 8
0
 public bool Update(ArticleStatus articlestatus ,int old_articleStatusId)
 {
     ArticleStatusDAC articlestatusComponent = new ArticleStatusDAC();
     return articlestatusComponent.UpdateArticleStatus( articlestatus.Name,  articlestatus.RowGuid,  articlestatus.ModifiedDate,  old_articleStatusId);
 }