public void delete(object o) { if (!(string.IsNullOrEmpty(ProductID2.ToString()))) { Admin admin = new Admin(); admin.ProductID = this.ProductID2; adminServices.deleteFromDataBase(admin); } }
public bool canDelete(object o) { if (string.IsNullOrEmpty(ProductID2.ToString()) || ProductID2 == 0) { return(false); } else { return(true); } }