Esempio n. 1
0
 public ArticleType GetByID(int _articleTypeID)
 {
     ArticleTypeDAC _articleTypeComponent = new ArticleTypeDAC();
      IDataReader reader = _articleTypeComponent.GetByIDArticleType(_articleTypeID);
      ArticleType _articleType = null;
      while(reader.Read())
      {
          _articleType = new ArticleType();
          if(reader["ArticleTypeID"] != DBNull.Value)
              _articleType.ArticleTypeID = Convert.ToInt32(reader["ArticleTypeID"]);
          if(reader["Name"] != DBNull.Value)
              _articleType.Name = Convert.ToString(reader["Name"]);
          if(reader["Code"] != DBNull.Value)
              _articleType.Code = Convert.ToString(reader["Code"]);
      _articleType.NewRecord = false;             }             reader.Close();
      return _articleType;
 }
Esempio n. 2
0
 public List<ArticleType> GetAll()
 {
     ArticleTypeDAC _articleTypeComponent = new ArticleTypeDAC();
      IDataReader reader =  _articleTypeComponent.GetAllArticleType().CreateDataReader();
      List<ArticleType> _articleTypeList = new List<ArticleType>();
      while(reader.Read())
      {
      if(_articleTypeList == null)
          _articleTypeList = new List<ArticleType>();
          ArticleType _articleType = new ArticleType();
          if(reader["ArticleTypeID"] != DBNull.Value)
              _articleType.ArticleTypeID = Convert.ToInt32(reader["ArticleTypeID"]);
          if(reader["Name"] != DBNull.Value)
              _articleType.Name = Convert.ToString(reader["Name"]);
          if(reader["Code"] != DBNull.Value)
              _articleType.Code = Convert.ToString(reader["Code"]);
      _articleType.NewRecord = false;
      _articleTypeList.Add(_articleType);
      }             reader.Close();
      return _articleTypeList;
 }
Esempio n. 3
0
 public bool Update( int ArticleTypeID,  string Name,  string Code,  int Original_ArticleTypeID)
 {
     ArticleTypeDAC articletypeComponent = new ArticleTypeDAC();
     return articletypeComponent.UpdateArticleType( ArticleTypeID,  Name,  Code,  Original_ArticleTypeID);
 }
Esempio n. 4
0
 public bool Update(ArticleType articletype ,int old_articleTypeID)
 {
     ArticleTypeDAC articletypeComponent = new ArticleTypeDAC();
     return articletypeComponent.UpdateArticleType( articletype.ArticleTypeID,  articletype.Name,  articletype.Code,  old_articleTypeID);
 }
Esempio n. 5
0
 public bool Insert( int ArticleTypeID,  string Name,  string Code)
 {
     ArticleTypeDAC articletypeComponent = new ArticleTypeDAC();
     return articletypeComponent.InsertNewArticleType( ArticleTypeID,  Name,  Code);
 }
Esempio n. 6
0
 public bool Insert(ArticleType articletype)
 {
     ArticleTypeDAC articletypeComponent = new ArticleTypeDAC();
     return articletypeComponent.InsertNewArticleType( articletype.ArticleTypeID,  articletype.Name,  articletype.Code);
 }
Esempio n. 7
0
 public void Delete(int Original_ArticleTypeID)
 {
     ArticleTypeDAC articletypeComponent = new ArticleTypeDAC();
     articletypeComponent.DeleteArticleType(Original_ArticleTypeID);
 }
Esempio n. 8
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     ArticleTypeDAC articletypecomponent = new ArticleTypeDAC();
     return articletypecomponent.UpdateDataset(dataset);
 }