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); }
public void UpdateAttachment(int? id,string attachment) { _da = new MaterialDataAccess(); _da.UpdateAttachment(id,attachment); }
public List<Entities.Material> GetMaterials() { _da = new MaterialDataAccess(); return _da.GetMaterials(); }
public Entities.Material GetMaterialByMaterialCode(string materialCode) { _da = new MaterialDataAccess(); return _da.GetMaterialByMaterialCode(materialCode); }
public Entities.Material GetMaterialById(int id) { _da = new MaterialDataAccess(); return _da.GetMaterialById(id); }
public List<Entities.Material> GetFilteredMaterials(string code, string name) { _da = new MaterialDataAccess(); return _da.GetFilteredMaterials(code, name); }
public void Delete(int? id) { _da = new MaterialDataAccess(); _da.Delete(id); }