public Material ConvertMaterialsToDB(BllMaterials tmpMaterial) { Material getmaterial = null; if (tmpMaterial is BllBalsam) { getmaterial = ConvertBalsamToDTO(tmpMaterial as BllBalsam); } else if (tmpMaterial is BllShampoo) { getmaterial = ConvertShampooToDTO(tmpMaterial as BllShampoo); } else if (tmpMaterial is BllLaque) { getmaterial = ConvertLaqueToDTO(tmpMaterial as BllLaque); } else if (tmpMaterial is BllColor) { getmaterial = ConvertColorToDTO(tmpMaterial as BllColor); } else if (tmpMaterial is BllPowder) { getmaterial = ConvertPowderToDTO(tmpMaterial as BllPowder); } else if (tmpMaterial is BllFoundation) { getmaterial = ConvertFoundationToDTO(tmpMaterial as BllFoundation); } else if (tmpMaterial is BllMascara) { getmaterial = ConvertMascaraToDTO(tmpMaterial as BllMascara); } else if (tmpMaterial is BllLipstick) { getmaterial = ConvertLipstickToDTO(tmpMaterial as BllLipstick); } else if (tmpMaterial is BllShadows) { getmaterial = ConvertShadowToDTO(tmpMaterial as BllShadows); } else if (tmpMaterial is BllNailBase) { getmaterial = ConvertBaseToDTO(tmpMaterial as BllNailBase); } else if (tmpMaterial is BllNailTop) { getmaterial = ConvertTopToDTO(tmpMaterial as BllNailTop); } else if (tmpMaterial is BllNailPolish) { getmaterial = ConvertPolishToDTO(tmpMaterial as BllNailPolish); } getmaterial.WriteOffMaterials = new List <WriteOffMaterial>(); return(getmaterial); }
public BllMaterials ConvertBllMaterials(Material tmpMaterial) { BllMaterials getmaterial = null; if (tmpMaterial is Balsam) { getmaterial = ConvertBalsamToBll(tmpMaterial as Balsam); } else if (tmpMaterial is Shampoo) { getmaterial = ConvertShampoToBLL(tmpMaterial as Shampoo); } else if (tmpMaterial is Laque) { getmaterial = ConvertLaqueToBll(tmpMaterial as Laque); } else if (tmpMaterial is HairColor) { getmaterial = ConvertColorToBll(tmpMaterial as HairColor); } else if (tmpMaterial is Powder) { getmaterial = ConvertPowderToBll(tmpMaterial as Powder); } else if (tmpMaterial is Foundation) { getmaterial = ConvertFoundationToBll(tmpMaterial as Foundation); } else if (tmpMaterial is Mascara) { getmaterial = ConvertMascaraToBll(tmpMaterial as Mascara); } else if (tmpMaterial is Lipstick) { getmaterial = ConvertLipstickToBLL(tmpMaterial as Lipstick); } else if (tmpMaterial is Shadows) { getmaterial = ConvertShadowToBll(tmpMaterial as Shadows); } else if (tmpMaterial is NailBase) { getmaterial = ConvertBaseToBll(tmpMaterial as NailBase); } else if (tmpMaterial is NailTop) { getmaterial = ConvertTopTOBLL(tmpMaterial as NailTop); } else if (tmpMaterial is NailPolish) { getmaterial = ConvertPolishToBLL(tmpMaterial as NailPolish); } return(getmaterial); }
public void AddMaterialToDB(BllMaterials bllmaterials) { function.AddMaterialToDB(convertationBll.ConvertMaterialsToDB(bllmaterials)); }
public void UpdateMaterial(BllMaterials bllMaterials) { function.UpdateMaterial(convertationBll.ConvertMaterialsToDB(bllMaterials)); }