Beispiel #1
0
        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is ERRawMaterialEntity))
            {
                return(false);
            }

            return(MaterialCode.Equals((obj as ERRawMaterialEntity).MaterialCode));
        }
Beispiel #2
0
        public static bool GetData(string sMaterialCode, out MaterialCode myMaterialCode, out string sMessage)
        {
            myMaterialCode = new MaterialCode();
            sMessage       = "";

            myMaterialCode.sPlant        = "SASW";
            myMaterialCode.sMaterialCode = sMaterialCode;
            myMaterialCode.dTotalCost    = 1000.0M;

            return(true);
        }
 public IActionResult Delete(MaterialCode MaterialCode)
 {
     if (MaterialCode == null)
     {
         return(BadRequest("the branch is Null"));
     }
     else
     {
         _repo.Delete(MaterialCode);
         return(Ok());
     }
 }
 public IActionResult Update(MaterialCode MaterialCode)
 {
     if (MaterialCode == null)
     {
         return(BadRequest("the branch is Null"));
     }
     else
     {
         _repo.Update(MaterialCode);
         var model = _mapper.Map <MaterialCodeVM>(MaterialCode);
         return(Ok(model));
     }
 }
        public IActionResult Get(int Id)
        {
            MaterialCode MaterialCode = _repo.Get(Id);

            if (MaterialCode == null)
            {
                return(BadRequest("branch not found"));
            }
            else
            {
                var model = _mapper.Map <MaterialCodeVM>(MaterialCode);
                return(Ok(model));
            }
        }
        public IActionResult Post([FromBody] MaterialCode materialCode)
        {
            if (materialCode == null)
            {
                return(BadRequest("employee is null"));
            }
            else
            {
                _repo.Add(materialCode);

                var model = _mapper.Map <MaterialCodeVM>(materialCode);
                return(Ok(model));
            }
        }
Beispiel #7
0
 public MaterialEntity(
     string materialManagementCode,
     string materialCode,
     string materialName,
     float materialQuantity,
     string materialUnit,
     DateTime materialExpirationDate)
 {
     MaterialManagementCode = new MaterialManagementCode(materialManagementCode);
     MaterialCode           = new MaterialCode(materialCode);
     MaterialName           = new MaterialName(materialName);
     MaterialQuantity       = new MaterialQuantity(materialQuantity);
     MaterialUnit           = new MaterialUnit(materialUnit);
     MaterialExpirationDate = new MaterialExpirationDate(materialExpirationDate);//SL
 }
Beispiel #8
0
 public override int GetHashCode()
 {
     return(MaterialCode.GetHashCode());
 }