예제 #1
0
 public Entities.Material Save(int? id, string materialCode, string name, string description
     , decimal? pricePerUnit, string attachment, DateTime? dateCreated
     , DateTime? dateModified, string createdBy, string modifiedBy)
 {
     _da = new MaterialDataAccess();
     if (id.HasValue)
     {
         return _da.Update(id.Value, materialCode, name, description, pricePerUnit, attachment
                        , dateCreated, dateModified, createdBy, modifiedBy);
     }
     return _da.Insert(materialCode, name, description, pricePerUnit, attachment
                       , dateCreated, dateModified, createdBy, modifiedBy);
 }
예제 #2
0
 public void UpdateAttachment(int? id,string attachment)
 {
     _da = new MaterialDataAccess();
     _da.UpdateAttachment(id,attachment);
 }
예제 #3
0
 public List<Entities.Material> GetMaterials()
 {
     _da = new MaterialDataAccess();
     return _da.GetMaterials();
 }
예제 #4
0
 public Entities.Material GetMaterialByMaterialCode(string materialCode)
 {
     _da = new MaterialDataAccess();
     return _da.GetMaterialByMaterialCode(materialCode);
 }
예제 #5
0
 public Entities.Material GetMaterialById(int id)
 {
     _da = new MaterialDataAccess();
     return _da.GetMaterialById(id);
 }
예제 #6
0
 public List<Entities.Material> GetFilteredMaterials(string code, string name)
 {
     _da = new MaterialDataAccess();
        return  _da.GetFilteredMaterials(code, name);
 }
예제 #7
0
 public void Delete(int? id)
 {
     _da = new MaterialDataAccess();
     _da.Delete(id);
 }